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.
Summary: | Cannot create NBM projects (bad redirect) | ||
---|---|---|---|
Product: | projects | Reporter: | Martin Schovanek <mschovanek> |
Component: | Maven | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anebuzelsky, johnjullion, kganfield, pjiricka, rnovak |
Priority: | P1 | Keywords: | REGRESSION |
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Martin Schovanek
2010-08-31 15:30:19 UTC
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/ 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 |