Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mvn archetype:generate does not work-no plugin found for prefix 'archetype'

Tags:

maven-2

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?

like image 750
Arrow Cen Avatar asked Jun 24 '11 19:06

Arrow Cen


People also ask

Which Maven plugin is used for archetype generation?

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.

What is Mvn archetype generate?

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.

How do I run an Mvn archetype?

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.

What is the default archetype Maven?

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 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.

like image 85
Jesse Webb Avatar answered Oct 02 '22 18:10

Jesse Webb