Fix integration tests to use correct Maven version instead of hardcoded 2.1-SNAPSHOT by gnodet · Pull Request #2476 · apache/maven (original) (raw)
added 8 commits
Switch default behavior from using build Maven installation to testing the Maven distribution generated by the current build. This eliminates the need for manual version updates during releases.
- Remove hardcoded maven-version property
- Align its/ and core-it-suite/ versions with parent project
- Keep core-it-support/ artifacts at stable 2.1-SNAPSHOT version
- Add maven-from-build profile to preserve old behavior
- Update documentation for new usage patterns
Default: mvn clean test -Prun-its (tests built distribution) Old behavior: mvn clean test -Prun-its,maven-from-build
Add maven-version property to core-it-support/pom.xml that references the parent version (4.0.0-rc-4-SNAPSHOT) to resolve the dependency version for maven-executor in maven-it-helper.
This fixes the build error: 'dependencies.dependency.version' for maven-executor must be a valid version but is '${maven-version}'
The integration-tests job needs to use the maven-from-build profile since it downloads and uses the built Maven distribution to run the build.
Cannot update the workflow directly due to GitHub security restrictions requiring workflow scope for OAuth apps.
The issue is that the new default behavior expects the distribution at apache-maven/target/ but the CI downloads it as an artifact. The solution is to copy the downloaded distribution to the expected location.
The file was causing RAT (Release Audit Tool) failures due to missing Apache license header. The workflow update information is already documented in the PR description.
Spotless moved the properties section to follow standard POM element order (after modules, before dependencyManagement).
This ensures that the support artifacts use the correct Maven version (4.0.0-rc-4-SNAPSHOT) instead of their own version (2.1-SNAPSHOT) when referencing Maven dependencies like maven-plugin-api and maven-core.
The maven-version property is set to the correct Maven version being tested.
- Add maven-version property to its/pom.xml set to 4.0.0-rc-4-SNAPSHOT
- Update all Maven dependency management entries to use maven-version property
- Add maven-executor to dependency management
- Remove duplicate dependency management from core-it-support/pom.xml
This ensures that integration test support artifacts use the correct Maven version (4.0.0-rc-4-SNAPSHOT) for Maven dependencies instead of their own version (2.1-SNAPSHOT), fixing dependency resolution issues.
gnodet changed the title
Change integration tests default to use built Maven distribution Fix integration tests to use correct Maven version instead of hardcoded 2.1-SNAPSHOT
gnodet deleted the feature/its-default-built-distribution branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})