aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven exception" Watch "Maven exception" New topic
Author

Maven exception

vi sh
Greenhorn

Joined: Sep 18, 2007
Posts: 3
Hi,

I am a new maven user. While executing command

C:\my-app>mvn -e archetype:create -DgroupId=com.mycompany.app -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
found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
ultLifecycleExecutor.java:1286)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor
(DefaultLifecycleExecutor.java:1522)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy
AggregationNeeds(DefaultLifecycleExecutor.java:386)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:138)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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 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
uginVersion(DefaultPluginVersionManager.java:228)
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePl
uginVersion(DefaultPluginVersionManager.java:90)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPlug
inManager.java:166)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Defa
ultLifecycleExecutor.java:1257)
... 14 more

Please adivce what is the reason.

Thanks in advance.
Vivek
vi sh
Greenhorn

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

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


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

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: http://aspose.com/file-tools
 
subject: Maven exception