title: Maven error when using command line to execute java program
body: <p>When I run my Maven project from Netbeans everything works properly. However, when i use the command line:</p>
  
  <pre><code>mvn exec:java -Dexec.mainClass="Main.Laucher" -Dexec.args=$args1 $args2 $args3
  </code></pre>
  
  <p>I obtain this error:</p>
  
  <pre><code>     [ERROR] BUILD FAILURE
       [INFO] ------------------------------------------------------------------------
       [INFO] Invalid task '1': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or
   pluginGroupId:pluginArtifactId:pluginVersion:goal
       [INFO] ------------------------------------------------------------------------
       [INFO] For more information, run Maven with the -e switch
       [INFO] ------------------------------------------------------------------------
       [INFO] Total time: &lt; 1 second
      [INFO] Finished at: Mon Apr 21 12:06:23 CEST 2014
       [INFO] Final Memory: 7M/491M
  </code></pre>
  
  <p>The maven version is :</p>
  
  <pre><code>Apache Maven 2.2.1 (rdebian-8)
  Java version: 1.7.0_51
  Java home: /usr/lib/jvm/java-7-oracle/jre
  Default locale: fr_FR, platform encoding: UTF-8
  OS name: "linux" version: "3.2.0-58-generic" arch: "amd64" Family: "unix"
  </code></pre>
  
  <p>In <code>pom.xml</code> i have <code>exec-maven-plugin</code>:</p>
  
  <blockquote>
  <pre><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.1&lt;/version&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;goals&gt;
            &lt;goal&gt;java&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
      &lt;configuration&gt;
           &lt;mainClass&gt;simulation.amazon.Laucher&lt;/mainClass&gt;
      &lt;/configuration&gt;
      &lt;/plugin&gt;
  </code></pre>
  </blockquote>
  
  <p>How can I resolve this error?</p>