org.apache.maven.mercury.repository.metadata.MetadataException: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'snapshotVersions' (position: START_TAG seen ...</lastUpdated>\n <snapshotVersions>... @12:23)

Sonatype JIRA | Sven Panko | 6 years ago
  1. 0

    When Maven 3 beta 3 is used to deploy a snapshot version of our projects, we are later on unable to fetch the latest snapshot version from Nexus (in fact we are not able to get any version, Maven reports a missing artifact). The problem does not happen with Maven 3 beta 2 or Maven 2. I tracked the problem down to the maven-metadata.xml file that is stored inside the version folder (i.e. alongside the artifact files). The maven-metadata.xml file that resides in the parent directory is correct. If you try to fetch the maven-metadata.xml, Nexus omits the following error message in the log: {noformat} org.apache.maven.mercury.repository.metadata.MetadataException: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'snapshotVersions' (position: START_TAG seen ...</lastUpdated>\n <snapshotVersions>... @12:23) at org.apache.maven.mercury.repository.metadata.MetadataBuilder.read(MetadataBuilder.java:61) at org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataProcessor.readMetadata(AbstractMetadataProcessor.java:78) at org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataProcessor.process(AbstractMetadataProcessor.java:39) at org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataHelper.onDirExit(AbstractMetadataHelper.java:90) at org.sonatype.nexus.proxy.maven.RecreateMavenMetadataWalkerProcessor.onCollectionExit(RecreateMavenMetadataWalkerProcessor.java:100) at org.sonatype.nexus.proxy.walker.DefaultWalker.onCollectionExit(DefaultWalker.java:340) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:257) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:110) at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doRecreateMavenMetadata(AbstractMavenRepository.java:212) at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.recreateMavenMetadata(AbstractMavenRepository.java:199) at org.sonatype.nexus.proxy.maven.AbstractMavenGroupRepository.recreateMavenMetadata(AbstractMavenGroupRepository.java:98) at org.sonatype.nexus.maven.tasks.RebuildMavenMetadataTask.doRun(RebuildMavenMetadataTask.java:57) at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:192) at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:338) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'snapshotVersions' (position: START_TAG seen ...</lastUpdated>\n <snapshotVersions>... @12:23) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.parseVersioning(MetadataXpp3Reader.java:654) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.parseMetadata(MetadataXpp3Reader.java:473) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:950) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:964) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:997) at org.apache.maven.mercury.repository.metadata.MetadataBuilder.read(MetadataBuilder.java:57) ... 27 more {noformat} The file is then reported as missing and Maven stops resolving the artifact. A sample file looks like this (notive the metadata modelVersion 1.1.0): {code:type=xml} <?xml version="1.0" encoding="UTF-8"?> <metadata modelVersion="1.1.0"> <groupId>foo.bar</groupId> <artifactId>baz</artifactId> <version>0.1.0-SNAPSHOT</version> <versioning> <snapshot> <timestamp>20100910.124939</timestamp> <buildNumber>9</buildNumber> </snapshot> <lastUpdated>20100910124939</lastUpdated> <snapshotVersions> <snapshotVersion> <value>0.1.0-20100910.124939-9</value> <updated>20100910124939</updated> </snapshotVersion> <snapshotVersion> <classifier>sources</classifier> <value>0.1.0-20100910.124939-9</value> <updated>20100910124939</updated> </snapshotVersion> </snapshotVersions> </versioning> </metadata> {code} Using an older version of Maven for deployments creates a maven-metadata.xml with a modelVersion 1.0.0, so I suspect that Nexus does not know of some internal changes made to Maven regarding this file.

    Sonatype JIRA | 6 years ago | Sven Panko
    org.apache.maven.mercury.repository.metadata.MetadataException: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'snapshotVersions' (position: START_TAG seen ...</lastUpdated>\n <snapshotVersions>... @12:23)
  2. 0

    When Maven 3 beta 3 is used to deploy a snapshot version of our projects, we are later on unable to fetch the latest snapshot version from Nexus (in fact we are not able to get any version, Maven reports a missing artifact). The problem does not happen with Maven 3 beta 2 or Maven 2. I tracked the problem down to the maven-metadata.xml file that is stored inside the version folder (i.e. alongside the artifact files). The maven-metadata.xml file that resides in the parent directory is correct. If you try to fetch the maven-metadata.xml, Nexus omits the following error message in the log: {noformat} org.apache.maven.mercury.repository.metadata.MetadataException: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'snapshotVersions' (position: START_TAG seen ...</lastUpdated>\n <snapshotVersions>... @12:23) at org.apache.maven.mercury.repository.metadata.MetadataBuilder.read(MetadataBuilder.java:61) at org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataProcessor.readMetadata(AbstractMetadataProcessor.java:78) at org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataProcessor.process(AbstractMetadataProcessor.java:39) at org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataHelper.onDirExit(AbstractMetadataHelper.java:90) at org.sonatype.nexus.proxy.maven.RecreateMavenMetadataWalkerProcessor.onCollectionExit(RecreateMavenMetadataWalkerProcessor.java:100) at org.sonatype.nexus.proxy.walker.DefaultWalker.onCollectionExit(DefaultWalker.java:340) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:257) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244) at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:110) at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doRecreateMavenMetadata(AbstractMavenRepository.java:212) at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.recreateMavenMetadata(AbstractMavenRepository.java:199) at org.sonatype.nexus.proxy.maven.AbstractMavenGroupRepository.recreateMavenMetadata(AbstractMavenGroupRepository.java:98) at org.sonatype.nexus.maven.tasks.RebuildMavenMetadataTask.doRun(RebuildMavenMetadataTask.java:57) at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:192) at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:338) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'snapshotVersions' (position: START_TAG seen ...</lastUpdated>\n <snapshotVersions>... @12:23) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.parseVersioning(MetadataXpp3Reader.java:654) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.parseMetadata(MetadataXpp3Reader.java:473) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:950) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:964) at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:997) at org.apache.maven.mercury.repository.metadata.MetadataBuilder.read(MetadataBuilder.java:57) ... 27 more {noformat} The file is then reported as missing and Maven stops resolving the artifact. A sample file looks like this (notive the metadata modelVersion 1.1.0): {code:type=xml} <?xml version="1.0" encoding="UTF-8"?> <metadata modelVersion="1.1.0"> <groupId>foo.bar</groupId> <artifactId>baz</artifactId> <version>0.1.0-SNAPSHOT</version> <versioning> <snapshot> <timestamp>20100910.124939</timestamp> <buildNumber>9</buildNumber> </snapshot> <lastUpdated>20100910124939</lastUpdated> <snapshotVersions> <snapshotVersion> <value>0.1.0-20100910.124939-9</value> <updated>20100910124939</updated> </snapshotVersion> <snapshotVersion> <classifier>sources</classifier> <value>0.1.0-20100910.124939-9</value> <updated>20100910124939</updated> </snapshotVersion> </snapshotVersions> </versioning> </metadata> {code} Using an older version of Maven for deployments creates a maven-metadata.xml with a modelVersion 1.0.0, so I suspect that Nexus does not know of some internal changes made to Maven regarding this file.

    Sonatype JIRA | 6 years ago | Sven Panko
    org.apache.maven.mercury.repository.metadata.MetadataException: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'snapshotVersions' (position: START_TAG seen ...</lastUpdated>\n <snapshotVersions>... @12:23)
  3. 0

    [NEXUS-3051] Rebuild metadata fails if maven-metadata.xml is 0 bytes in size. - Sonatype JIRA

    sonatype.org | 1 year ago
    org.apache.maven.mercury.repository.metadata.MetadataException: java.io.EOFException: input contained no data
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [NEXUS-3051] Rebuild metadata fails if maven-metadata.xml is 0 bytes in size. - Sonatype JIRA

    sonatype.org | 12 months ago
    org.apache.maven.mercury.repository.metadata.MetadataException: java.io.EOFException: input contained no data
  6. 0

    building pluto from source

    portals-pluto-user | 1 decade ago | Brice Lambi
    org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'integrationUnitTest' (position: START_TAG seen ...</integrationUnitTestSourceDirectory>\r\n\r\n <integrationUnitTest>... @292:26)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.codehaus.plexus.util.xml.pull.XmlPullParserException

      Unrecognised tag: 'snapshotVersions' (position: START_TAG seen ...</lastUpdated>\n <snapshotVersions>... @12:23)

      at org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.parseVersioning()
    2. org.apache.maven
      MetadataBuilder.read
      1. org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.parseVersioning(MetadataXpp3Reader.java:654)
      2. org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.parseMetadata(MetadataXpp3Reader.java:473)
      3. org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:950)
      4. org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:964)
      5. org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader.read(MetadataXpp3Reader.java:997)
      6. org.apache.maven.mercury.repository.metadata.MetadataBuilder.read(MetadataBuilder.java:57)
      6 frames
    3. ${project.groupId}:${project.artifactId}
      AbstractNexusTask.call
      1. org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataProcessor.readMetadata(AbstractMetadataProcessor.java:78)
      2. org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataProcessor.process(AbstractMetadataProcessor.java:39)
      3. org.sonatype.nexus.proxy.maven.metadata.AbstractMetadataHelper.onDirExit(AbstractMetadataHelper.java:90)
      4. org.sonatype.nexus.proxy.maven.RecreateMavenMetadataWalkerProcessor.onCollectionExit(RecreateMavenMetadataWalkerProcessor.java:100)
      5. org.sonatype.nexus.proxy.walker.DefaultWalker.onCollectionExit(DefaultWalker.java:340)
      6. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:257)
      7. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244)
      8. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244)
      9. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244)
      10. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244)
      11. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244)
      12. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244)
      13. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:244)
      14. org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:110)
      15. org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doRecreateMavenMetadata(AbstractMavenRepository.java:212)
      16. org.sonatype.nexus.proxy.maven.AbstractMavenRepository.recreateMavenMetadata(AbstractMavenRepository.java:199)
      17. org.sonatype.nexus.proxy.maven.AbstractMavenGroupRepository.recreateMavenMetadata(AbstractMavenGroupRepository.java:98)
      18. org.sonatype.nexus.maven.tasks.RebuildMavenMetadataTask.doRun(RebuildMavenMetadataTask.java:57)
      19. org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:192)
      19 frames
    4. ${project.groupId}:${project.artifactId}
      DefaultScheduledTask.call
      1. org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:338)
      1 frame
    5. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      7. java.lang.Thread.run(Thread.java:619)
      7 frames