Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-13916

Generation of maven-metadata.xml representing a group of plugins adds an extra "groupId" tag, which to be used for artifacts

    XMLWordPrintable

    Details

    • Story Points:
      3

      Description

      When using “Rebuild Maven repository metadata” task, maven-metadata.xml that represents plugin groups, has and extra “groupId” tag. As maven documentation states here (http://maven.apache.org/ref/3.5.0/maven-repository-metadata/repository-metadata.html) there are two types of matadata content: artifacts /artifact versions (groupId, artifactId, version, versioning) and group of plugins (plugins).

      Metadata generated by Nexus 3

      <metadata modelVersion="1.1.0">
        <groupId>org.codehaus.mojo</groupId>
        <plugins>
          <plugin>
            <name>Maven Wagon plugin</name>
            <prefix>wagon</prefix>
            <artifactId>wagon-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </metadata>
      

      Metadata in Maven Central (http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml

      <metadata>
        <plugins>
          <plugin>
            <name>Animal Sniffer Maven Plugin</name>
            <prefix>animal-sniffer</prefix>
            <artifactId>animal-sniffer-maven-plugin</artifactId>
          </plugin>
      ...
          <plugin>
            <name>Maven XSLT Plugin</name>
            <prefix>xslt</prefix>
            <artifactId>xslt-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </metadata>
      

      When using the maven repository directly that is not really an issue but when that repository participates in maven repository group is one.

      Current Nexus 3 matadata merge (RepositoryMetadataMerger.merge) has a validation bug so when merging metadata for plugins from different repositories may result in a incomplete result.

        Attachments

          Activity

            People

            Assignee:
            jtom Joe Tom
            Reporter:
            pitg Petre
            Last Updated By:
            Peter Lynch
            Team:
            Nexus - Formats
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title