Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Quickstart Archetype does not exist

Tags:

java

maven

I wanted to start a new project using maven. Installed Maven 3.3.9, put it in my path, created an empty folder and ran the command given in https://maven.apache.org/archetypes/maven-archetype-quickstart/

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPSHOT

Instead of a new project, I got an error

E:\CODING\prj>mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository not defined. Using the one from [org.apache.maven.archetypes:maven-archetype-quickstart:1.1] found in catalog remote
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.016 s
[INFO] Finished at: 2016-11-04T13:41:30-04:00
[INFO] Final Memory: 12M/114M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype-quickstart:5-SNAPSHOT) -> [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

Does anyone know why? Even better, how DO I create a blank Maven project?

like image 957
George Avatar asked Nov 04 '16 17:11

George


People also ask

What is Maven-archetype-Quickstart?

maven-archetype-quickstart is an archetype which generates a sample Maven project: project. |-- pom.

How do I find my Maven archetype?

The archetype descriptor is a file called archetype-metadata. xml which must be located in the src/main/resources/META-INF/maven/ directory.

What is default Maven archetype?

the default archetype number now is 1092 1092: remote -> org. apache. maven. archetypes:maven-archetype-quickstart (An archetype which contains a sample Maven project.)


1 Answers

The specified version is not valid. It's from a 2010-edited Maven example page.

The most recent archetype version is 1.1 (ironically, also from 2010), so try this instead:

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.1
like image 91
nandsito Avatar answered Sep 20 '22 08:09

nandsito