[
https://issues.apache.org/jira/browse/MNG-7709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17695209#comment-17695209
]
ASF GitHub Bot commented on MNG-7709:
-------------------------------------
gnodet opened a new pull request, #1023:
URL: https://github.com/apache/maven/pull/1023
Following this checklist to help us incorporate your
contribution quickly and easily:
- [ ] Make sure there is a [JIRA
issue](https://issues.apache.org/jira/browse/MNG) filed
for the change (usually before you start working on it). Trivial
changes like typos do not
require a JIRA issue. Your pull request should address just this
issue, without
pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line
and body.
- [ ] Format the pull request title like `[MNG-XXX] SUMMARY`,
where you replace `MNG-XXX` and `SUMMARY` with the appropriate JIRA
issue.
- [ ] Also format the first line of the commit message like `[MNG-XXX]
SUMMARY`.
Best practice is to use the JIRA issue title in both the pull request
title and in the first line of the commit message.
- [ ] Write a pull request description that is detailed enough to
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more
thorough check will
be performed on your pull request automatically.
- [ ] You have run the [Core IT][core-its] successfully.
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January
2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [ ] I hereby declare this contribution to be licenced under the [Apache
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor
License Agreement](https://www.apache.org/licenses/icla.pdf).
[core-its]: https://maven.apache.org/core-its/core-it-suite/
> plexus-utils upgrade changes the way configuration is parsed
> ------------------------------------------------------------
>
> Key: MNG-7709
> URL: https://issues.apache.org/jira/browse/MNG-7709
> Project: Maven
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.9.0, 4.0.0-alpha-4
> Reporter: Jonathan Haber
> Assignee: Tamas Cservenak
> Priority: Minor
> Fix For: 3.9.1
>
>
> While upgrading to Maven 3.9.0, we noticed a change in the way some of our
> pom configuration is parsed. This seems to be a very rare edge case that we
> can work around, but I wanted to flag it in case the root cause turns out to
> have more widespread impact. I put together a small repo that demonstrates
> the issue:
> [https://github.com/jhaber/maven-configuration-reproducer]
> Summary of reproducer:
> * The parent module configures the shade plugin with an outputFile parameter:
> [link|https://github.com/jhaber/maven-configuration-reproducer/blob/4017887fed8bd9c7abd7174407be56531db912b0/pom.xml#L16-L23]
> * The child module inherits from parent and resets the shade plugin
> configuration (using <configuration combine.self="override"/>):
> [link|https://github.com/jhaber/maven-configuration-reproducer/blob/4017887fed8bd9c7abd7174407be56531db912b0/child/pom.xml#L20-L25]
> * However, child module also configures shade plugin inside a profile (adding
> an unrelated finalName parameter):
> [link|https://github.com/jhaber/maven-configuration-reproducer/blob/4017887fed8bd9c7abd7174407be56531db912b0/child/pom.xml#L41-L47]
> * The nested-child module inherits from child module. It doesn't contain any
> configuration, but it activates the profile:
> [link|https://github.com/jhaber/maven-configuration-reproducer/tree/main/child/nested-child]
>
> 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.
> I also built a custom version of Maven 3.9.0 which uses plexus-utils 3.3.1,
> and the behavior is back to normal. So I think the behavior change is in
> plexus-utils (although it could be that Maven is "mis-using" plexus-utils,
> and the plexus-utils change is technically correct). I tested with a few
> different plexus-utils versions and it seems like the behavior change was
> introduced in plexus-utils 3.4.0 (I also tested with plexus-utils 3.5.0 and
> this issue is not fixed).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)