aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Not Getting Started with Maven - Archtype plugin Not found 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 "Not Getting Started with Maven - Archtype plugin Not found" Watch "Not Getting Started with Maven - Archtype plugin Not found" New topic
Author

Not Getting Started with Maven - Archtype plugin Not found

Deepak Gaikwad
Greenhorn

Joined: Jan 05, 2009
Posts: 3
Hi
I followed all instructions on how to set up maven and new project but getting following error.

mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -e

I have tried following.
1. Delete .m2 folder.
2. Tried the command many time as suggested by previous thread

Error ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
C:\maventest>mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-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-archetype-plugin' does not exist or no valid version could be found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1303)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1542)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:405)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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-archetype-plugin' does not exist or no valid version could be f
ound
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:171)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1274)
... 14 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13 seconds
[INFO] Finished at: Mon Jan 05 13:57:58 GMT+05:30 2009
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Deepak,

It appears to be telling you that it can't download the archetype plugin from the Maven repository (which is out on the internet). Does your firewall permit Maven?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Deepak Gaikwad
Greenhorn

Joined: Jan 05, 2009
Posts: 3
Thanks Martijn,
How do I verify that my firewell is not permitting.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

You'll need to check with your network people (I'm assuming you are at work here). Also check this section of the maven docs
Deepak Gaikwad
Greenhorn

Joined: Jan 05, 2009
Posts: 3
Martijn,

Till this point I was in office and I see that the .m2 folder was not getting created but now from home I ran the same command. From home, I can see there are 2 folders in .m2/repository folder 1) org\apache\maven\plugins\maven-archetype-plugin 2) org\codehaus\mojo

But the script is further failing giving I think the same error.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
C:\maventest>mvn -X archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=net.roseindia.maven.quickstart -DartifactId=HelloMaven -e
+ Error stacktraces are turned on.
Maven version: 2.0.9
Java version: 1.6.0_06
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\GaikxDee\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'C:\Deepak\Softwares\apache-maven-2.0.9\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins
[INFO] org.apache.maven.plugins: checking for updates from central
[DEBUG] repository metadata for: 'org.apache.maven.plugins' could not be found on repository: central
[DEBUG] Loading plugin prefixes from group: org.codehaus.mojo
[INFO] org.codehaus.mojo: checking for updates from central
[DEBUG] repository metadata for: 'org.codehaus.mojo' could not be found on repository: central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
[DEBUG] repository metadata for: 'artifact org.apache.maven.plugins:maven-archetype-plugin' could not be found on repository: central
[DEBUG] maven-archetype-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the latest version

org.apache.maven.plugins:maven-archetype-plugin:pom:LATEST


[DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-archetype-plugin:pom:LATEST
[DEBUG] maven-archetype-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the release version

org.apache.maven.plugins:maven-archetype-plugin:pom:RELEASE


[DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-archetype-plugin:pom:RELEASE
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1303)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1542)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:405)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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-archetype-plugin' does not exist or no valid versio
ound
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:171)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1274)
... 14 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 34 seconds
[INFO] Finished at: Mon Jan 05 20:49:48 GMT+05:30 2009
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

What version of Maven are you running?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not Getting Started with Maven - Archtype plugin Not found