Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-333

Errors creating project from previously accepted archetype

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.0-alpha-5
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Maven 3.0 RC3, JDK 6, Ubuntu
    • Number of attachments :
      0

      Description

      rm -rf test && mvn -DarchetypeVersion=1.0 -DgroupId=test -DarchetypeArtifactId=osgi-archetype -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.codehaus.mojo.archetypes -Dpackage=test -DartifactId=test -B org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate
      

      succeeds. The same with 2.0-alpha-5 fails:

      [ERROR] Cannot parse archetype descriptor
      org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unknown attribute 'id' for tag 'archetype-descriptor' (position: START_TAG seen ... id="osgi-archetype" partial="false" name="OSGI Bundle archetype">... @2:88) 
      	at org.apache.maven.archetype.metadata.io.xpp3.ArchetypeDescriptorXpp3Reader.checkUnknownAttribute(ArchetypeDescriptorXpp3Reader.java:99)
      	at org.apache.maven.archetype.metadata.io.xpp3.ArchetypeDescriptorXpp3Reader.parseArchetypeDescriptor(ArchetypeDescriptorXpp3Reader.java:579)
      	at org.apache.maven.archetype.metadata.io.xpp3.ArchetypeDescriptorXpp3Reader.read(ArchetypeDescriptorXpp3Reader.java:1212)
      	at org.apache.maven.archetype.metadata.io.xpp3.ArchetypeDescriptorXpp3Reader.read(ArchetypeDescriptorXpp3Reader.java:1141)
      	at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.loadFileSetArchetypeDescriptor(DefaultArchetypeArtifactManager.java:477)
      

      Indeed the id attribute is not supposed to be there, and http://fisheye.codehaus.org/browse/mojo/trunk/mojo/mojo-archetypes/osgi-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml?r2=12260&r1=11739 fixed this and will be in the next archetype release.

      In the meantime, though, anyone trying to use the latest maven-archetype-plugin with the latest released archetype will be unable to, even though the unrecognized attribute did not actually harm anything. Please downgrade this class of error to a warning, at least for a while until corrected archetypes are broadly available.

      Will try to create & submit a patch upon request.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Herve Boutemy
              Reporter:
              Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: