title: Jenkins multi configuration passing parameters when running Maven job
body: <p>I'm trying to set up a Jenkins multi configuration job for the selenium tests of my project that runs against multiple browsers. I checked the different options and the multi configuration job seems to be a good fit, but I cannot make maven pass the parameters correctly to maven.</p>
  
  <p>I have a few parameters I need to pass to maven, mainly browserName and appDomain, and also a Profile to run the tests. To configure the job I do the following:</p>
  
  <ul>
  <li>Define the SVN repository from where the code will be checked out.</li>
  <li>Set up browserName as a user define axis, with values FIREFOX, CHROME, IE.</li>
  <li><p>Create a build step of type "Invoke top-level Maven targets", and here's where I get the problems. The configuration of this part is different from other job types, usually there's a field called Goals and Options where to put everything, but in this case is divided in different fields. So I don't know where exactly put the properties and the profile.</p>
  
  <p>a) The logical thing, I put the goals in Goals field and the parameters and options in the properties field, like in the image:</p></li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/IDjdr.png" alt="first case"></p>
  
  <p>In this case the job runs normally without executing the tests, because the profile is not executed.</p>
  
  <p>b) If I put just the profile in the Goals field, the maven call in the log is:</p>
  
  <pre><code>/opt/apache-maven-2.2.1/bin/mvn -DbrowserName=CHROME "-D-Dappdomain=0 -Dtestenv=test  -Drc=true -DsuiteXmlFile=testOne.xml -U -Dapp.instance.key=jenkins -Denv=default" clean verify -Pwebtests
  </code></pre>
  
  <p>And the exception is:</p>
  
  <pre><code>[INFO] [enforcer:enforce {execution: enforce-property}]
  [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireProperty failed with message:
  You must pass the appdomain as parameter! Example: -Dappdomain=20
  [WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireProperty failed with message:
  You must pass the test environment as parameter! Example: -Dtestenv=beta
  </code></pre>
  
  <p>So is not getting the properties</p>
  
  <p>c) Finally, if I put everything in the goals field, I get the following exception:</p>
  
  <pre><code>[ERROR] BUILD ERROR
  [INFO] ------------------------------------------------------------------------
  [INFO] One or more required plugin parameters are invalid/missing for 'property:merge'
  
  [0] Inside the definition for plugin 'property-maven-plugin' specify the following:
  
  &lt;configuration&gt;
    ...
    &lt;environment&gt;VALUE&lt;/environment&gt;
  &lt;/configuration&gt;
  -OR-
  on the command line, specify: '-Denv=VALUE'
  </code></pre>
  
  <p>I tried with a normal and parametrized job and works perfectly...</p>
  
  <p>Jenkins version is: 1454 and Maven is 2.2.1</p>