I want to build a simple project using a existing archetype. But I can't run mvn archetype:generate
as it keeps telling me the following information
[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Documents and Settings\ccen\.m2\repository), central (ht tp://repo1.maven.org/maven2)] -> [Help 1]
I was using MS Windows and didn't use any settings.xml
in my ~/.m2 folder and all stuff is brand new. Could any one help me to figure it out?
The Archetype Plugin allows the user to create a Maven project from an existing template called an archetype. It also allows the user to create an archetype from an existing project. This plugin requires Java 7.
Full name: org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate. Description: Generates a new project from an archetype, or updates the actual project if using a partial archetype. If the project is fully generated, it is generated in a directory corresponding to its artifactId.
To start a new Maven project, use the Maven Archetype plugin from the command line. Run the archetype:generate goal, select default archetype suggested by pressing "Enter". This will use the archetype org. apache.
the default archetype number now is 1092 1092: remote -> org. apache. maven. archetypes:maven-archetype-quickstart (An archetype which contains a sample Maven project.)
The other thing that could be going wrong is that your machine is behind a firewall or proxy so your box is not able to hit http://repo1.maven.org/maven2
. Try accessing this URL directly in a browser or something to test if you are able to make the request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With