tags:

views:

15

answers:

1

I have Maven 2.2.0, JDK 6 on Mac OS X 10.6 with the system firewall is set to on.

I'm trying to create a web application via maven archtype:

mvn archtype:generate 

But I got this error:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archtype-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-archtype-plugin' does not exist or no valid version could be found
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1568)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1808)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:446)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:176)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-archtype-plugin' does not exist or no valid version could be found
    at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:229)
    at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:91)
    at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:172)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1539)
    ... 15 more

Any idea what is going wrong?

A: 

It's archetype, not archtype. So try this instead:

mvn archetype:generate 
Pascal Thivent
I agree. The official plugin documentation is here : http://maven.apache.org/archetype/maven-archetype-plugin/
Benoit Courtine
Shame one me :)
El Gusto
I entered "182" as I want to create a JEE5 web application, it prompts me to choose a version.Cannot parse archetype descriptororg.codehaus.plexus.util.xml.pull.XmlPullParserException: Unknown attribute 'id' for tag 'archetype-descriptor' (position: START_TAG seen ...ebapp-jee5" partial="false" name="JEE5 web application archetype">
El Gusto
@ElGusto: Hmm, it looks like there is a problem with some archetypes, see http://jira.codehaus.org/browse/ARCHETYPE-304.
Pascal Thivent