Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven install command gives an error

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

The MVN command is 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 end up with 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's 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] 
like image 665
Illep Avatar asked Mar 15 '26 13:03

Illep


1 Answers

The archetype you want to use is not in the maven central repository (the fallback message). Maven tells you It cannot execute the archetype generate goal since it cannot find the archetype.

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

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

If the archetype was available in maven central this step would not be required.

like image 158
wemu Avatar answered Mar 18 '26 03:03

wemu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!