[jira] [Commented] (MNG-6801) MavenXpp3Writer doesn't retain order of properties

2022-12-16 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17648816#comment-17648816
 ] 

Michael Osipov commented on MNG-6801:
-

[~gnodet], do you see a reaonsable way to back port his to 3.x?

> MavenXpp3Writer doesn't retain order of properties
> --
>
> Key: MNG-6801
> URL: https://issues.apache.org/jira/browse/MNG-6801
> Project: Maven
>  Issue Type: Bug
>  Components: Plugins and Lifecycle
>Reporter: Liana Lupsa
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 3.8.x-candidate, 4.0.0-alpha-2, 4.0.0
>
>
> Context: 
>  We are using pipeline-utility-steps-plugin which is a jenkins plugin which 
> uses the following classes:
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/ReadMavenPomStep.java].
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  In our Jenkins file we have a stage that overwrites the version in the pom 
> with the computed version and for this we need pipeline-utility-steps-plugin.
> The problem is that the tags in the pom.xml are never retained in the same 
> order. The elements in the pom file are completelly rearranged.
>  For consistency reasons and idempotency we need to retain the structure and 
> simply update one line.
> Status:
>  After evaluating the plugin code we noticed that it uses: 
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  and imports:
>  import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
>  with 
> [https://maven.apache.org/ref/3.3.9/maven-model/apidocs/src-html/org/apache/maven/model/io/xpp3/MavenXpp3Writer.html]
>  which uses 
>  XmlSerializer serializer = new MXSerializer();
>  
> [https://github.com/sonatype/plexus-utils/blob/master/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java]
>  We think that maven XmlSerializer causes this problem.
> Example of the pom.xml changes:
> first build trigger:
> run 1:
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> run 2:
> 
>  1.10.19
>  3.1.0
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> ​and run 3: 
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-6801) MavenXpp3Writer doesn't retain order of properties

2022-10-28 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17625898#comment-17625898
 ] 

Hudson commented on MNG-6801:
-

Build succeeded in Jenkins: Maven » Maven TLP » maven » PR-810 #7

See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/PR-810/7/

> MavenXpp3Writer doesn't retain order of properties
> --
>
> Key: MNG-6801
> URL: https://issues.apache.org/jira/browse/MNG-6801
> Project: Maven
>  Issue Type: Bug
>  Components: Plugins and Lifecycle
>Reporter: Liana Lupsa
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 3.8.x-candidate, 4.0.0-alpha-2, 4.0.0
>
>
> Context: 
>  We are using pipeline-utility-steps-plugin which is a jenkins plugin which 
> uses the following classes:
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/ReadMavenPomStep.java].
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  In our Jenkins file we have a stage that overwrites the version in the pom 
> with the computed version and for this we need pipeline-utility-steps-plugin.
> The problem is that the tags in the pom.xml are never retained in the same 
> order. The elements in the pom file are completelly rearranged.
>  For consistency reasons and idempotency we need to retain the structure and 
> simply update one line.
> Status:
>  After evaluating the plugin code we noticed that it uses: 
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  and imports:
>  import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
>  with 
> [https://maven.apache.org/ref/3.3.9/maven-model/apidocs/src-html/org/apache/maven/model/io/xpp3/MavenXpp3Writer.html]
>  which uses 
>  XmlSerializer serializer = new MXSerializer();
>  
> [https://github.com/sonatype/plexus-utils/blob/master/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java]
>  We think that maven XmlSerializer causes this problem.
> Example of the pom.xml changes:
> first build trigger:
> run 1:
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> run 2:
> 
>  1.10.19
>  3.1.0
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> ​and run 3: 
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-6801) MavenXpp3Writer doesn't retain order of properties

2022-10-20 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17620923#comment-17620923
 ] 

Hudson commented on MNG-6801:
-

Build succeeded in Jenkins: Maven » Maven TLP » maven » MNG-7543 #3

See 
https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/MNG-7543/3/

> MavenXpp3Writer doesn't retain order of properties
> --
>
> Key: MNG-6801
> URL: https://issues.apache.org/jira/browse/MNG-6801
> Project: Maven
>  Issue Type: Bug
>  Components: Plugins and Lifecycle
>Reporter: Liana Lupsa
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 3.8.x-candidate, 4.0.0-alpha-2, 4.0.0
>
>
> Context: 
>  We are using pipeline-utility-steps-plugin which is a jenkins plugin which 
> uses the following classes:
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/ReadMavenPomStep.java].
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  In our Jenkins file we have a stage that overwrites the version in the pom 
> with the computed version and for this we need pipeline-utility-steps-plugin.
> The problem is that the tags in the pom.xml are never retained in the same 
> order. The elements in the pom file are completelly rearranged.
>  For consistency reasons and idempotency we need to retain the structure and 
> simply update one line.
> Status:
>  After evaluating the plugin code we noticed that it uses: 
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  and imports:
>  import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
>  with 
> [https://maven.apache.org/ref/3.3.9/maven-model/apidocs/src-html/org/apache/maven/model/io/xpp3/MavenXpp3Writer.html]
>  which uses 
>  XmlSerializer serializer = new MXSerializer();
>  
> [https://github.com/sonatype/plexus-utils/blob/master/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java]
>  We think that maven XmlSerializer causes this problem.
> Example of the pom.xml changes:
> first build trigger:
> run 1:
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> run 2:
> 
>  1.10.19
>  3.1.0
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> ​and run 3: 
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-6801) MavenXpp3Writer doesn't retain order of properties

2022-10-10 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17615354#comment-17615354
 ] 

Hudson commented on MNG-6801:
-

Build succeeded in Jenkins: Maven » Maven TLP » maven » master #98

See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/master/98/

> MavenXpp3Writer doesn't retain order of properties
> --
>
> Key: MNG-6801
> URL: https://issues.apache.org/jira/browse/MNG-6801
> Project: Maven
>  Issue Type: Bug
>  Components: Plugins and Lifecycle
>Reporter: Liana Lupsa
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0-alpha-1, 4.0.0
>
>
> Context: 
>  We are using pipeline-utility-steps-plugin which is a jenkins plugin which 
> uses the following classes:
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/ReadMavenPomStep.java].
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  In our Jenkins file we have a stage that overwrites the version in the pom 
> with the computed version and for this we need pipeline-utility-steps-plugin.
> The problem is that the tags in the pom.xml are never retained in the same 
> order. The elements in the pom file are completelly rearranged.
>  For consistency reasons and idempotency we need to retain the structure and 
> simply update one line.
> Status:
>  After evaluating the plugin code we noticed that it uses: 
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  and imports:
>  import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
>  with 
> [https://maven.apache.org/ref/3.3.9/maven-model/apidocs/src-html/org/apache/maven/model/io/xpp3/MavenXpp3Writer.html]
>  which uses 
>  XmlSerializer serializer = new MXSerializer();
>  
> [https://github.com/sonatype/plexus-utils/blob/master/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java]
>  We think that maven XmlSerializer causes this problem.
> Example of the pom.xml changes:
> first build trigger:
> run 1:
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> run 2:
> 
>  1.10.19
>  3.1.0
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> ​and run 3: 
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-6801) MavenXpp3Writer doesn't retain order of properties

2022-10-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17615337#comment-17615337
 ] 

ASF GitHub Bot commented on MNG-6801:
-

gnodet merged PR #811:
URL: https://github.com/apache/maven/pull/811




> MavenXpp3Writer doesn't retain order of properties
> --
>
> Key: MNG-6801
> URL: https://issues.apache.org/jira/browse/MNG-6801
> Project: Maven
>  Issue Type: Bug
>  Components: Plugins and Lifecycle
>Reporter: Liana Lupsa
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0-alpha-1, 4.0.0
>
>
> Context: 
>  We are using pipeline-utility-steps-plugin which is a jenkins plugin which 
> uses the following classes:
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/ReadMavenPomStep.java].
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  In our Jenkins file we have a stage that overwrites the version in the pom 
> with the computed version and for this we need pipeline-utility-steps-plugin.
> The problem is that the tags in the pom.xml are never retained in the same 
> order. The elements in the pom file are completelly rearranged.
>  For consistency reasons and idempotency we need to retain the structure and 
> simply update one line.
> Status:
>  After evaluating the plugin code we noticed that it uses: 
>  
> [https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/maven/WriteMavenPomStep.java#L32]
>  and imports:
>  import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
>  with 
> [https://maven.apache.org/ref/3.3.9/maven-model/apidocs/src-html/org/apache/maven/model/io/xpp3/MavenXpp3Writer.html]
>  which uses 
>  XmlSerializer serializer = new MXSerializer();
>  
> [https://github.com/sonatype/plexus-utils/blob/master/src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java]
>  We think that maven XmlSerializer causes this problem.
> Example of the pom.xml changes:
> first build trigger:
> run 1:
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> run 2:
> 
>  1.10.19
>  3.1.0
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  
> ​and run 3: 
> 
>  3.1.0
>  1.10.19
>  2.1
>  6.5.1
>  1.18.6
>  4.12
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)