Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recessive node attributes not set anymore in Xpp3DomUtils when dominant root node value is empty #230

Closed
guylabs opened this issue Jan 5, 2023 · 7 comments

Comments

@guylabs
Copy link

guylabs commented Jan 5, 2023

The change in 67ac243 causes different merging outcomes before and after the change. This has been discussed in 67ac243#r94996401.

A reproducer of the issue is shown in https://github.com/guylabs/plexus-utils-merge-xml-reproducer where the same configuration is executed on Maven 3.8.7 and on Maven 4.0.0-alpha3.

guylabs referenced this issue Jan 5, 2023
@guylabs
Copy link
Author

guylabs commented Jan 9, 2023

@kwin were you able to have a look at the reproducer already?

@kwin
Copy link
Contributor

kwin commented Jan 9, 2023

Not yet. Can you simplify that into a unit test? The reproducer uses a lot of xpp3dom merging methods. It is still not clear to me which method calls the dominant element with an empty value and why…

@guylabs
Copy link
Author

guylabs commented Jan 9, 2023

It's this part that has been removed:

67ac243#diff-8daf65446126b8abe5b619665bb0697d522273192ee8cb2bd74a371e3eb3b407L143-L148

It's not easy to simplify but the reproducer shows nicely the diff between the files and what is not working as expected.

@guylabs
Copy link
Author

guylabs commented Jan 17, 2023

@kwin any update on this?

@c00ler
Copy link

c00ler commented Feb 6, 2023

@kwin @guylabs I wrote a simple reproducer test for this issue: https://github.com/c00ler/plexus-utils-merge-xml-reproducer/blob/main/src/test/java/com/github/avenderov/ReproducerTest.java. It shows that the issue is not in the plexus-utils. I run the test with the version before the change 3.4.2 and after the change 3.5.0, and in both cases test passes. The issue is happening in Maven 4 as it's not using Xpp3Dom class and corresponding utility methods anymore but has its own implementation that has a regression. I will create an issue in the maven issue tracker.

@c00ler
Copy link

c00ler commented Feb 6, 2023

The corresponding ticket in the maven issue tracker: https://issues.apache.org/jira/browse/MNG-7683

@gnodet
Copy link
Member

gnodet commented Mar 1, 2023

Closing as the issue lies in the maven 4 code base.

@gnodet gnodet closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants