Affected version
HEAD 4.1.x
Bug description
See #11612 and #11505 and #11632 on master branch.
Maven 4.x introduces a unified <sources> element that supports modular project layouts (src/<module>/<scope>/<lang>). However, resource handling did not follow the modular layout - resources were always loaded from the legacy <resources> element which defaults to src/main/resources. This change implements automatic module-aware resource injection.
- For modular projects without resource configuration in
<sources>, automatically inject resource roots following the modular layout: src/<module>/main/resources and src/<module>/test/resources.
- Resources configured via
<sources> take priority over legacy <resources>.
- Issue warnings (as
ModelProblem) when explicit legacy resources are ignored.
The first two are fine. The last isn't. Resources the user clearly meant to include are dropped from the build. This should be a full build failure that requires the user to fix their project one way or another, not a simple warning.
Affected version
HEAD 4.1.x
Bug description
See #11612 and #11505 and #11632 on master branch.
Maven 4.x introduces a unified
<sources>element that supports modular project layouts (src/<module>/<scope>/<lang>). However, resource handling did not follow the modular layout - resources were always loaded from the legacy<resources>element which defaults tosrc/main/resources. This change implements automatic module-aware resource injection.<sources>, automatically inject resource roots following the modular layout:src/<module>/main/resourcesandsrc/<module>/test/resources.<sources>take priority over legacy<resources>.ModelProblem) when explicit legacy resources are ignored.The first two are fine. The last isn't. Resources the user clearly meant to include are dropped from the build. This should be a full build failure that requires the user to fix their project one way or another, not a simple warning.