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

Merge behavior changed in plexus-utils 3.4.0 #239

Closed
jhaber opened this issue Feb 23, 2023 · 1 comment
Closed

Merge behavior changed in plexus-utils 3.4.0 #239

jhaber opened this issue Feb 23, 2023 · 1 comment

Comments

@jhaber
Copy link

jhaber commented Feb 23, 2023

Hi there, thanks for all the great work on this project. While upgrading from Maven 3.8.7 (which uses plexus-utils 3.3.1) to Maven 3.9.0 (which uses plexus-utils 3.4.2) we noticed a change in the way some of our pom configuration is merged. I filed MNG-7709, but I also wanted to open an issue here because it appears that the behavior change is in plexus-utils (the behavior change is not present if I build a custom Maven 3.9.0 that uses plexus-utils 3.3.1). I tried a few different versions and it appears that the behavior change was introduced in plexus-utils 3.4.0 (not sure which commit).

I put together a reproducer here. There's more detail in the readme, but the issue seems to manifest when you try to clear plugin configuration, while also reconfiguring that same plugin inside a profile (in the same pom). The setup in the reproducer is:

  • The parent module configures the shade plugin with an outputFile parameter: link
  • The child module inherits from parent and resets the shade plugin configuration (using <configuration combine.self="override"/>): link
  • However, child module also configures shade plugin inside a profile (adding an unrelated finalName parameter): link
  • The nested-child module inherits from child module. It doesn't contain any configuration, but it activates the profile: link

It is expected that child and nested-child do not inherit the outputFile parameter, because the shade configuration is removed in child pom.xml. This works in Maven 3.8.7, but in Maven 3.9.0 the nested-child module does inherit the outputFile parameter. I assume this has something to do with the profile getting activated and causing the configuration to not get merged properly, but I'm not sure.

@jhaber
Copy link
Author

jhaber commented Mar 1, 2023

Sounds like this was accidentally introduced in #74 and will be reverted in #241

@jhaber jhaber 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

1 participant