kalayciburak opened a new pull request, #12938: URL: https://github.com/apache/maven/pull/12938
## Summary `mvnup apply` always logged `Saving modified POMs...` and wrote every discovered POM, even when every strategy reported `0 POM(s) modified`. That both misleads the user and rewrites files that did not change. `UpgradeResult` already tracks `modifiedPoms`. Apply now: - writes only those POMs - skips the save report entirely when the set is empty This answers the question on the issue: previously yes, unmodified files were rewritten; they are not anymore. Fixes #12931 ## Checklist - [x] Your pull request should address just one issue, without pulling in other changes. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Each commit in the pull request should have a meaningful subject line and body. - [x] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. - [x] Run `mvn verify` to make sure basic checks pass. - [ ] You have run the Core IT successfully. - [x] I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004 ## Test plan Executed: ``` mvn -pl impl/maven-cli test -Dtest=AbstractUpgradeGoalTest,ApplyTest,CheckTest,UpgradeResultTest,StrategyOrchestratorTest ``` Result: 48 tests, 0 failures (includes new `shouldNotRewriteOrReportWhenNoneModified` and `shouldWriteOnlyModifiedPoms`). Also executed: ``` mvn -pl impl/maven-cli test ``` Result: 665 tests, 0 failures, 2 skipped. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
