title: Pass command line Params in mvn exec:exec
body: <p>I am amazed that what should have been a very easy job is turning into a very annoying task for me. All i need is to pass few command line parameters to my maven exec:exec plugin. unfortunately hours of googling has not helped at all.</p>
  
  <p>Here is my plugin</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.2&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-instrument&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;configuration&gt;
          &lt;executable&gt;java&lt;/executable&gt;
          &lt;arguments&gt;
              &lt;argument&gt;-classpath&lt;/argument&gt;
              &lt;classpath /&gt;
              &lt;argument&gt;-javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring.version}/spring-instrument-${spring.version}.jar&lt;/argument&gt;
              &lt;argument&gt;-Xmx256m&lt;/argument&gt;
              &lt;argument&gt;com.myPackage.Myclass&lt;/argument&gt;
          &lt;/arguments&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;goals&gt;
                  &lt;goal&gt;exec&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Now from the command prompt i am typing in:</p>
  
  <pre><code>mvn exec:exec -Dexec.args=-Dmy.property=myProperty
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>mvn exec:exec -Dexec.arguments=-Dmy.property=myProperty
  </code></pre>
  
  <p>And many other things. However nothing seems to be working. I know that exec:exec runs in a separate VM but as per the documentation -Dexec.args should work for me. Can someone please suggest where i am going wrong?</p>