gnodet opened a new pull request, #12997:
URL: https://github.com/apache/maven/pull/12997

   ## Summary
   
   - Detects custom (non-standard) `ResourceTransformer` implementations in 
`maven-shade-plugin` configuration before upgrading the plugin version
   - Skips the upgrade and emits a warning when custom transformers are found, 
preventing silent build breakage
   - Covers both direct POM declarations and effective model analysis 
(inherited plugins)
   
   ## Problem
   
   `mvnup` upgrades `maven-shade-plugin` from old versions (e.g. 1.3.3) to 
3.5.0 for Maven 4 compatibility. However, projects using custom 
`ResourceTransformer` implementations (e.g. `BeansXmlTransformer` in 
myfaces-extcdi) may depend on transitive dependencies like `org.jdom:jdom` that 
were available in old shade-plugin versions but removed in newer ones. The 
upgrade silently breaks these projects.
   
   ## Solution
   
   Added detection logic (following the existing Quarkus plugin skip pattern) 
that inspects `<configuration>/<transformers>/<transformer 
implementation="...">` elements in both top-level and per-execution 
configurations. Transformers whose `implementation` class does not start with 
`org.apache.maven.plugins.shade.resource.` are considered custom. When found, 
the upgrade is skipped with a warning message advising manual upgrade.
   
   ## Test plan
   
   - [x] 11 new tests in `PluginUpgradeShadeTest` covering all scenarios
   - [x] Custom transformer in execution config → skip upgrade
   - [x] Custom transformer in top-level config → skip upgrade
   - [x] Standard transformers only → upgrade proceeds
   - [x] No transformers → upgrade proceeds
   - [x] Mixed standard + custom → skip upgrade
   - [x] Property-based version with custom transformers → skip upgrade
   - [x] Without explicit groupId + custom transformers → skip upgrade
   - [x] Custom transformers in pluginManagement → skip upgrade
   - [x] Unit tests for `findCustomTransformerClasses` method
   - [x] All 42 existing `PluginUpgradeStrategyTest` tests pass
   - [x] All 10 existing `PluginUpgradeQuarkusTest` tests pass
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to