Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6987

Reorder groupId before artifactId when writing an exclusion using maven-model

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.6.3
    • 3.8.2, 4.0.0-alpha-2, 4.0.0
    • POM
    • None

    Description

      We are using maven-model to parse, modify, and write back a POM file roughly like so:

       

      MavenXpp3Reader reader = new MavenXpp3Reader(); 
      Model model = reader.read(new FileReader(input)); 
      // make modifications to the model 
      MavenXpp3Writer writer = new MavenXpp3Writer(); 
      writer.write(new FileWriter(output), model);

       

      The exclusion shows up in the output file like this:

              <exclusions>
                <exclusion>
                  <artifactId>plexus-cipher</artifactId>
                  <groupId>org.sonatype.plexus</groupId>
                </exclusion>
              </exclusions>
      

      In most other places in the POM, we order the groupId before the artifactId. It would be nice to do it the same way for exclusion, like so:

              <exclusions>
                <exclusion>
                  <groupId>org.sonatype.plexus</groupId>
                  <artifactId>plexus-cipher</artifactId>
                </exclusion>
              </exclusions>
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            michael-o Michael Osipov
            marcbr Marc Bruggmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment