[maven-4.0.x] Fix CI-friendly version processing with profile properties (fix #11196) by gnodet · Pull Request #11225 · apache/maven (original) (raw)
Changes to \ in profiles do not propagate to the final project version. This issue occurs because CI-friendly version processing happens before profile activation, so profile properties are not available during version resolution.
This commit implements enhanced property resolution that performs lightweight profile activation during CI-friendly version processing to ensure profile properties are available for both version resolution and repository URL interpolation.
Key changes:
- Enhanced CI-friendly version processing with profile-aware property resolution
- Unified property resolution for both CI-friendly versions and repository URLs
- Added directory properties (basedir, rootDirectory) to profile activation context
- Comprehensive test coverage for profile-based CI-friendly versions
The solution maintains full backward compatibility while enabling profile-based version manipulation that was possible in Maven 3 but broken in Maven 4.
Fixes apache#11196
(cherry picked from commit 02de10f)