title: Maven 3: Maven in 5 minutes "mvn archetype:generate..." command NOT WORKING
body: <p>I installed Maven 3.1.1 for the first time. In the "Maven in 5 Minutes" getting-started guide</p>
  
  <p><a href="http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html" rel="noreferrer">http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html</a></p>
  
  <p>it says to verify the installation with</p>
  
  <p><code>mvn --version</code></p>
  
  <p>I got the expected response:</p>
  
  <pre><code>Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
  Maven home: C:\applications\programming\apache-maven-3.1.1
  Java version: 1.6.0_17, vendor: Sun Microsystems Inc.
  Java home: C:\applications\programming\java_6_17\jre
  Default locale: en_US, platform encoding: Cp1252
  OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
  </code></pre>
  
  <p>In the next step, under "Creating a project" it says to create a new directory, open a command prompt in that directory, and execute</p>
  
  <p><code>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false</code></p>
  
  <p>I created a directory called <code>xjmaven</code>, ran the command in it, and it's not working. This is the response:</p>
  
  <pre><code>[R:\jeffy\programming\sandbox\xjmaven]mvn archetype:generate -DgroupId=xbnjava -DartifactId=XBN-Java -Darchetype ArtifactId=maven-archetype-quickstart -DinteractiveMode=false
  [INFO] Scanning for projects...
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 0.251s
  [INFO] Finished at: Sat Nov 23 12:11:56 EST 2013
  [INFO] Final Memory: 2M/4M
  [INFO] ------------------------------------------------------------------------
  [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (R:\jeffy\programming\sandbox\xjmaven). Please verify you invoked Maven from the correct directory. -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [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 read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
  </code></pre>
  
  <p>I looked up the parameters <code>groupId</code>, <code>artifactId</code> and <code>archetypeArtifactId</code>, and have tried some different values (as you can see above), but I still get the same BUILD FAILURE response.</p>
  
  <p>I manually put the <code>pom.xml</code> file (from in the same webpage) in the xjmaven directory, and ran it again. It downloaded a bunch of stuff (although not to <code>xjmaven</code>), but then failed with this message:</p>
  
  <pre><code>[INFO] Generating project in Interactive mode
  Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/true/1.0/true-1.0.jar
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Skipping Maven Quick Start Archetype
  [INFO] This project has been banned from the build due to previous failures.
  [INFO] ------------------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 45.047s
  [INFO] Finished at: Sat Nov 23 12:04:01 EST 2013
  [INFO] Final Memory: 7M/17M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project XBN-Java: The desired archetype does not exist (org.apache.maven.archetypes:true:1.0) -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [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 read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>
  
  <p>Repeating the command gives this response:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Maven Quick Start Archetype 1.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] &gt;&gt;&gt; maven-archetype-plugin:2.2:generate (default-cli) @ XBN-Java &gt;&gt;&gt;
  [INFO]
  [INFO] &lt;&lt;&lt; maven-archetype-plugin:2.2:generate (default-cli) @ XBN-Java &lt;&lt;&lt;
  [INFO]
  [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ XBN-Java ---
  [INFO] Generating project in Interactive mode
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Skipping Maven Quick Start Archetype
  [INFO] This project has been banned from the build due to previous failures.
  [INFO] ------------------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 4.444s
  [INFO] Finished at: Sat Nov 23 12:04:32 EST 2013
  [INFO] Final Memory: 8M/14M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project XBN-Java: The desired archetype does not exist (org.apache.maven.archetypes:true:1.0) -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [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 read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>
  
  <p>I deleted <code>pom.xml</code> (it's the only file in the directory...the stuff it downloaded is not there), and started over again. Everything happens (badly) as I write above.</p>
  
  <hr>
  
  <p>I remember trying Maven a few years ago, and could also not get past the getting-started stage.</p>
  
  <p>If anyone has some advice on how to get past this, it would be appreciated. Really frustrated.</p>