Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven exception

 
vi sh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
guys no reply on this?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
barron logan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be a firewall issue. Turn your firewall off and try again using the -U switch...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic