Maven install command gives error

I ran the following maven command as shown in the following GitHub project.

MVN Team mvn archetype:generate -DarchetypeGroupId=com.github.spring-mvc-archetypes -DarchetypeArtifactId=spring-mvc-quickstart -DarchetypeVersion=1.0.0 -DgroupId=my.groupid -DartifactId=my-artifactId -Dversion=version

However, I am getting the following error:

[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo.maven.apache.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype repository is elsewhere.
Downloading: http://repo.maven.apache.org/maven2/com/github/spring-mvc-archetypes/spring-mvc-quickstart/1.0.0/spring-mvc-quickstart-1.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.882 s
[INFO] Finished at: 2015-05-22T22:42:38+05:30
[INFO] Final Memory: 15M/114M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.github.spring-mvc-archetypes:spring-mvc-quickstart:1.0.0) -> [Help 1]
[ERROR] 

      

+3


source to share


1 answer


The archetype you want to use is not in the central maven repository (fallback post). Maven tells you that it cannot fulfill the purpose of the archetype as it cannot find the archetype.

I think the best way is to follow the instructions for this archetype: https://github.com/kolorobot/spring-mvc-quickstart-archetype



you need to clone the repository, do a clean install of maven (which will install this archetype in your local maven repository). Then the archetype can be used normally.

If the archetype was available in maven hub, this step is not required.

+3


source







All Articles