Marc Bruggmann created MNG-6987:
-----------------------------------
Summary: Reorder groupId before artifactId when writing an exclusion using maven-model
Key: MNG-6987
URL: https://issues.apache.org/jira/browse/MNG-6987
Project: Maven
Issue Type: Improvement
Reporter: Marc Bruggmann
We are using {{maven-model}} to parse, modify, and write back a POM file roughly like so:
{code:java}
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);{code}
The exclusion shows up in the output file like this:
{code:java}
<exclusions>
<exclusion>
<artifactId>plexus-cipher</artifactId>
<groupId>org.sonatype.plexus</groupId>
</exclusion>
</exclusions>
{code}
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:
{code:java}
<exclusions>
<exclusion>
<groupId>org.sonatype.plexus</groupId>
<artifactId>plexus-cipher</artifactId>
</exclusion>
</exclusions>
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
|