I've been struggling to get maven up and running with managed repositories. Please help me identify the root cause of the problem. Following are my environment details:
Apache Maven 2.1.0 (r755702; 2009-03-19 00:10:27+0500) Java version: 1.6.0_12 Java home: C:\Program Files\Java\jdk1.6.0_12\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows" I am using Archiva 1.2 installed on the same machine. I am behind a proxy therefore; I've configured Network Proxy in Archiva and link that to Proxy Repositories. I've also tested Archive 1.2 by downloading "struts2-core-2.1.6.jar" directly via browser using following URL: http://localhost:8080/archiva/repository/internal/org/apache/struts/struts2- core/2.1.6/struts2-core-2.1.6.jar Archiva audit log shows following entry and the file was downloaded successfully (also visible on Browse page) 2009-05-11 12:44:26 internal guest 0:0:0:0:0:0:0:1 "org/apache/struts/struts2-core/2.1.6/struts2-core-2.1.6.jar" "Created File (proxied)" Because Archiva is running on same machine and I've forced maven to use ONLY internal repository installed locally, I haven't done any network proxy settings in maven's setting file. Now when I try to create a project I got following error on console: COMMAND-PROMPT>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app -X -U -e + Error stacktraces are turned on. Apache Maven 2.1.0 (r755702; 2009-03-19 00:10:27+0500) Java version: 1.6.0_12 Java home: C:\Program Files\Java\jdk1.6.0_12\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows" [DEBUG] Building Maven user-level plugin registry from: 'C:\Users\S M Humayun\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'C:\Program Files\Apache Software Foundation\apache-maven-2.1.0\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] Using mirror: http://localhost:8080/archiva/repository/internal/ (id: archiva.default) [DEBUG] Checking for pre-existing User-Agent configuration. [DEBUG] Adding User-Agent configuration. [DEBUG] Connecting to repository: 'archiva.default' with url: 'http://localhost:8080/archiva/repository/internal/'. [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] Using mirror: http://localhost:8080/archiva/repository/internal/ (id: archiva.default) [DEBUG] Checking for pre-existing User-Agent configuration. [DEBUG] Adding User-Agent configuration. [DEBUG] Connecting to repository: 'archiva.default' with url: 'http://localhost:8080/archiva/repository/internal/'. [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] Using mirror: http://localhost:8080/archiva/repository/internal/ (id: archiva.default) [DEBUG] Checking for pre-existing User-Agent configuration. [DEBUG] Adding User-Agent configuration. [DEBUG] Connecting to repository: 'archiva.default' with url: 'http://localhost:8080/archiva/repository/internal/'. [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(DefaultLife cycleExecutor.java:1546) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(Defaul tLifecycleExecutor.java:1786) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggrega tionNeeds(DefaultLifecycleExecutor.java:446) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle Executor.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:356) 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 val id version could be found at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVer sion(DefaultPluginVersionManager.java:229) at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVer sion(DefaultPluginVersionManager.java:91) at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManag er.java:172) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLife cycleExecutor.java:1517) ... 14 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Mon May 11 13:53:05 UZT 2009 [INFO] Final Memory: 1M/4M [INFO] ------------------------------------------------------------------------ And archiva.log file shows following messages: 2009-05-11 14:37:10,276 [http-8080-6] INFO org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors - Transfer not attempted on http://repo1.maven.org/maven2//org/apache/maven/plugins/maven-metadata.xml : NO to fetch, check-failures detected previous failure on url: http://repo1.maven.org/maven2//org/apache/maven/plugins/maven-metadata.xml 2009-05-11 14:37:10,301 [http-8080-3] INFO org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors - Transfer not attempted on http://repo1.maven.org/maven2//org/codehaus/mojo/maven-metadata.xml : NO to fetch, check-failures detected previous failure on url: http://repo1.maven.org/maven2//org/codehaus/mojo/maven-metadata.xml 2009-05-11 14:37:10,317 [http-8080-3] INFO org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors - Transfer not attempted on http://repo1.maven.org/maven2//org/apache/maven/plugins/maven-archetype-plug in/maven-metadata.xml : NO to fetch, check-failures detected previous failure on url: http://repo1.maven.org/maven2//org/apache/maven/plugins/maven-archetype-plug in/maven-metadata.xml Regards, -------------------------------------------- S M Humayun Software Architect, IBL Group -------------------------------------------- Email : [email protected] MSN : [email protected] Skype : smhumayun Cell : 92.321.8707783 Blog : <http://smhumayun.blogspot.com/> http://smhumayun.blogspot.com Link : <http://www.linkedin.com/in/smhumayun> http://www.linkedin.com/in/smhumayun --------------------------------------------
