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

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.3
    • Fix Version/s: 3.7.0
    • Component/s: POM
    • Labels:
      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: