title: Passing arguments to Maven release build
body: <p>I'm trying to release a library using Maven and perform a site-deploy to sourceforge (I have create an interactive shell first). The release is done by a Jenkins job (using the Maven Release Plugin for Jenkins).</p>
  
  <p>I tried:</p>
  
  <pre><code>-X -e -Dresume=false -Dusername=puce release:prepare release:perform -Darguments="-Dusername=puce"
  </code></pre>
  
  <p>and</p>
  
  <pre><code>-X -e -Dresume=false -Dusername=puce -Darguments=-Dusername=puce release:prepare release:perform
  </code></pre>
  
  <p>but both times the job hangs at site:deploy of the first module:</p>
  
  <pre><code> [INFO] --- maven-site-plugin:3.2:deploy (default-deploy) @ myproject-parent ---
   [INFO] Parent project loaded from repository: myGroupId:myOtherproject-parent:pom:1.0
   [INFO] Parent project loaded from repository: myGroupId:myOtherproject-parent:pom:1.0
   Using private key: /opt/jenkins/.ssh/id_dsa
  </code></pre>
  
  <p>When I stop the job, the following gets printed at end:</p>
  
  <pre><code>Password for ${username}@shell.sourceforge.net: channel stopped
  </code></pre>
  
  <p>which probably means that ${username} wasn't resolved.</p>
  
  <p>How can I resolve the ${username}?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Note that the following runs fine:</p>
  
  <pre><code>site-deploy -Psonatype-oss-release -Dusername=puce
  </code></pre>
  
  <p><strong>Edit 2:</strong>
  As part of release:perform maven executes the following command:</p>
  
  <pre><code>/usr/share/maven/bin/mvn -s /tmp/release-settings7797889802430474959.xml deploy site-deploy --no-plugin-updates --batch-mode -Psonatype-oss-release -P nexus -f pom.xml
  </code></pre>
  
  <p><code>-Dusername=puce</code> doesn't seem to get passed to this maven command...</p>
  
  <p>Also note that help:effective-pom shows the following maven-release-plugin configuration:</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
    &lt;version&gt;2.2.2&lt;/version&gt;
    &lt;configuration&gt;
      &lt;mavenExecutorId&gt;forked-path&lt;/mavenExecutorId&gt;
      &lt;useReleaseProfile&gt;false&lt;/useReleaseProfile&gt;
      &lt;arguments&gt;-Psonatype-oss-release&lt;/arguments&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>So 'arguments' gets defined and its value seems to reach the embedded maven command instead of the value passed on the command line...</p>