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

June 13, 2025 08:15

@gnodet

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.

Default: mvn clean test -Prun-its (tests built distribution) Old behavior: mvn clean test -Prun-its,maven-from-build

@gnodet

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}'

@gnodet

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.

@gnodet

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.

@gnodet

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.

@gnodet

Spotless moved the properties section to follow standard POM element order (after modules, before dependencyManagement).

@gnodet

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.

@gnodet

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 gnodet changed the titleChange integration tests default to use built Maven distribution Fix integration tests to use correct Maven version instead of hardcoded 2.1-SNAPSHOT

Jun 13, 2025

@gnodet gnodet deleted the feature/its-default-built-distribution branch

June 24, 2025 16:01

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 }})