title: maven error BUILD FAILURE
body: <p>I am following a maven tutorial. I am trying to execute this command which is my 1st maven command. Tutorial says it will crate a directory named my-app, but it didn't. This is command &amp; its output,
  command:</p>
  
  <pre><code>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>C:\Users\Babar&gt;mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=m
  y-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
  [INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Maven Stub Project (No POM) 1
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] &gt;&gt;&gt; maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom &gt;&gt;
  &gt;
  [INFO]
  [INFO] &lt;&lt;&lt; maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom &lt;&lt;
  &lt;
  [INFO]
  [INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom --
  -
  [INFO] Generating project in Batch mode
  [INFO] -------------------------------------------------------------------------
  ---
  [INFO] Using following parameters for creating project from Old (1.x) Archetype:
   maven-archetype-quickstart:1.0
  [INFO] -------------------------------------------------------------------------
  ---
  [INFO] Parameter: groupId, Value: com.mycompany.app
  [INFO] Parameter: packageName, Value: com.mycompany.app
  [INFO] Parameter: package, Value: com.mycompany.app
  [INFO] Parameter: artifactId, Value: my-app
  [INFO] Parameter: basedir, Value: C:\Users\Babar
  [INFO] Parameter: version, Value: 1.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 22.971s
  [INFO] Finished at: Fri Nov 18 00:07:12 EET 2011
  [INFO] Final Memory: 6M/11M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
  .1:generate (default-cli) on project standalone-pom: Directory my-app already ex
  ists - please run from a clean directory -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
  ch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please rea
  d the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
  eption
  'cmd' is not recognized as an internal or external command,
  operable program or batch file.
  </code></pre>
  
  <p>error msg says directory already exists but it's not. I execute this command more than oncw</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>command(suggested in answer)</p>
  
  <pre><code>mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archet
      ypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPS
      HOT
  </code></pre>
  
  <p>OUTPUT</p>
  
  <pre><code>C:\Users\Babar&gt;mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archet
  ypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPS
  HOT
  [INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Maven Stub Project (No POM) 1
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] &gt;&gt;&gt; maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom &gt;&gt;
  &gt;
  [INFO]
  [INFO] &lt;&lt;&lt; maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom &lt;&lt;
  &lt;
  [INFO]
  [INFO] --- maven-archetype-plugin:2.1:generate (default-cli) @ standalone-pom --
  -
  [INFO] Generating project in Interactive mode
  [INFO] Archetype repository missing. Using the one from [org.apache.maven.archet
  ypes:maven-archetype-quickstart:1.1] found in catalog remote
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 5.552s
  [INFO] Finished at: Fri Nov 18 01:09:15 EET 2011
  [INFO] Final Memory: 6M/12M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
  .1:generate (default-cli) on project standalone-pom: The desired archetype does
  not exist (org.apache.maven.archetypes:maven-archetype-quickstart:5-SNAPSHOT) -&gt;
   [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
  ch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please rea
  d the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
  eption
  'cmd' is not recognized as an internal or external command,
  operable program or batch file.
  </code></pre>