This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[#2010083100001, jdk1.6] to reproduce: ------------- 1) create a new: Maven Web Application project ERROR: IDE fails with: JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home "/Applications/NetBeans/NetBeans Dev 201008310001.app/Contents/Resources/NetBeans/java/maven/bin/mvn" -DarchetypeVersion=1.1 -Darchetype.interactive=false -DgroupId=com.mycompany -DarchetypeArtifactId=webapp-javaee6 -DarchetypeRepository=http://repository.codehaus.org -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.codehaus.mojo.archetypes -Darchetype.repository=http://repository.codehaus.org -Dbasedir=/Users/ms113234/NetBeansProjects -Dpackage=com.mycompany.mavenproject19 -DartifactId=mavenproject19 -Dnetbeans.execution=true --batch-mode org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate Scanning for projects... ------------------------------------------------------------------------ Building Maven Stub Project (No POM) 1 ------------------------------------------------------------------------ >>> maven-archetype-plugin:2.0-alpha-4:generate (default-cli) @ standalone-pom >>> <<< maven-archetype-plugin:2.0-alpha-4:generate (default-cli) @ standalone-pom <<< --- maven-archetype-plugin:2.0-alpha-4:generate (default-cli) @ standalone-pom --- Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. Setting property: velocimacro.messages.on => 'false'. Setting property: resource.loader => 'classpath'. Setting property: resource.manager.logwhenfound => 'false'. Generating project in Batch mode Archetype defined by properties ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 1.760s Finished at: Tue Aug 31 17:24:09 CEST 2010 Final Memory: 6M/81M ------------------------------------------------------------------------ Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate (default-cli) on project standalone-pom: The defined artifact is not an archetype -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I can not reproduce with the latest continuous build. Martin, can you still reproduce?
Reproducible on #201009020000, with fresh userdir and Maven repository (${usrdir/.m2}).
You are right, with fresh Maven repository it is reproducible. Although I am getting a different error: Generating project in Batch mode Archetype defined by properties *** CHECKSUM FAILED - Checksum failed on download: local = '9f8629fad916b496eb77ea70c0e35976a27a56e3'; remote = '<!DOCTYPE' - RETRYING *** CHECKSUM FAILED - Checksum failed on download: local = '9f8629fad916b496eb77ea70c0e35976a27a56e3'; remote = '<!DOCTYPE' - IGNORING ------------------------------------------------------------------------ BUILD FAILURE I see the archetype was not downloaded correctly - the size of webapp-javaee6-1.1.jar on the disk is 425 bytes, when it should be >4 KB.
Version 1.1 of webapp-javaee6 archetype is simply broken. This version was introduced on June/30 as a fix for issue 181861 and issue 186223. I see a difference between 1.0.2 (as used by 6.9.1) and 1.1 in archetype-metadata.xml file. Version 1.1 includes the following additional data in the archetype-descriptor element: <archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" partial="false" name="JavaEE6 web application archetype"> while 1.0.2 contained only <archetype-descriptor id="webapp-javaee6" partial="false" name="JavaEE6 web application archetype"> It needs to be fixed in the archetype, new version released and the reference updated in maven/src/org/netbeans/modules/maven/newproject/ArchetypeWizardUtils.java
The same applies to 1.1 versions of archetypes: webapp-javaee6 ejb-javaee6 ear-javaee6 ear-jee5 ear-j2ee14 BTW, the archetypes can be browsed online at https://nexus.codehaus.org/content/repositories/releases/org/codehaus/mojo/archetypes/
See also http://jira.codehaus.org/browse/MARCHETYPES-36
The archetypes are fine; the problem is in Maven: http://jira.codehaus.org/browse/MNG-4816 http://jira.codehaus.org/browse/ARCHETYPE-327 is also relevant for diagnosis.
core-main #8891f03ceb92
Integrated into 'main-golden', will be available in build *201009180000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8891f03ceb92 User: Jesse Glick <jglick@netbeans.org> Log: #190033: M3 cannot handle 301 server redirects.
Seems it is still a problem for http://snapshots.repository.codehaus.org/org/codehaus/mojo/archetypes/nbm-archetype/1.3-SNAPSHOT/maven-metadata.xml which now redirects to a 404, i.e. content does not appear anywhere so there is no known workaround.
One workaround would be to publish snapshot versions of archetypes we rely on to http://bits.netbeans.org/maven2/ so we can be sure they remain available. I do not have physical authority to do this, however.
Hmm, turns out there were already newer release versions of these archetypes published on central... dsimonek had just neglected to tell the IDE to use them. core-main #25b189e6d3ba
*** Bug 189940 has been marked as a duplicate of this bug. ***
With the fixes I was still receiving the same error ("The defined artifact is not an archetype") when trying to create e.g. a Maven Web Application project. If this happens to someone, they need to remove the archetypes from their local maven repo before trying again: rm -rf ~/.m2/repository/org/codehaus/mojo/archetypes
Integrated into 'main-golden', will be available in build *201009220000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/25b189e6d3ba User: Jesse Glick <jglick@netbeans.org> Log: #190033 cont'd: no need to use broken snapshot repo when newer releases available anyway!
(In reply to comment #7) > The archetypes are fine; the problem is in Maven: > http://jira.codehaus.org/browse/MNG-4816 More up to date: http://jira.codehaus.org/browse/MNG-4838 http://jira.codehaus.org/browse/WAGON-314