Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-333

Errors creating project from previously accepted archetype

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 2.0-alpha-5
    • None
    • None
    • None
    • Maven 3.0 RC3, JDK 6, Ubuntu

    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.

      Attachments

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              jglick Jesse N. Glick
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: