The moose likes Ant, Maven and Other Build Tools and the fly likes Maven exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven exception" Watch "Maven exception" New topic

Maven exception

vi sh

Joined: Sep 18, 2007
Posts: 3

I am a new maven user. While executing command

C:\my-app>mvn -e archetype:create -DartifactId=my-app

i am getting following exception:
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.m
aven.plugins:maven-archetype-plugin' does not exist or no valid version could be
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.execute(
at org.apache.maven.cli.MavenCli.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
at java.lang.reflect.Method.invoke(
at org.codehaus.classworlds.Launcher.launchEnhanced(
at org.codehaus.classworlds.Launcher.launch(
at org.codehaus.classworlds.Launcher.mainWithExitCode(

at org.codehaus.classworlds.Launcher.main(
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The p
lugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no val
id version could be found
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPlug
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
... 14 more

Please adivce what is the reason.

Thanks in advance.
vi sh

Joined: Sep 18, 2007
Posts: 3
guys no reply on this?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Are you connected to the internet when running this? Maven needs to download plugins when it runs.

There could also be proxy/firewall issues(address these so Maven can download plugins, or install plugins manually), or a corrupted version of the plugin (delete the plugin from the local .m2 repository and have Maven download it again).

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
barron logan

Joined: Jun 30, 2004
Posts: 6
It could be a firewall issue. Turn your firewall off and try again using the -U switch...
I agree. Here's the link:
subject: Maven exception
It's not a secret anymore!