Fix #406: make integration tests test the locally built version - #408
Open
elharo wants to merge 2 commits into
Open
Fix #406: make integration tests test the locally built version#408elharo wants to merge 2 commits into
elharo wants to merge 2 commits into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #406.
Three
effective-pom/evaluateITs were flaky on CI (while usually passing locally). Each ran its goal withartifact=org.apache.maven.plugins:maven-help-plugin(no version). Theartifactparameter treats a missing version asLATEST, which the plugin resolves by fetchingmaven-metadata.xmland the plugin POM from remote repositories (Maven Central through the mock repository manager proxy).This made the ITs depend on:
Change
Pinned the artifact to the plugin version under test by configuring it in the ITs' (invoker-filtered) POMs:
@project.version@is filtered to the locally built version (e.g.3.5.3-SNAPSHOT), which the invokerinstallgoal already places into the IT local repository. The fake project is therefore built from the local plugin POM: noLATESTmetadata resolution, no Central downloads, and the output stays exactly whatverify.groovyasserts. Removed the now-redundantartifactlines from the ITs'test.properties.Applied to:
evaluate-artifact-with-expression-with-output(MPH-114): theartifactparameter builds a fake project and evaluates expressions against it whilesession.currentProjectremains the real project (per the enforcer rule).effective-pom-artifact(MPH-106): prints the effective POM of the given artifact.effective-pom-multimodule-artifact(MPH-105): same, in a multi-module reactor.Verification
mvn -Prun-its -Dinvoker.test=evaluate-artifact-with-expression-with-output verify: passes.mvn -Prun-its -Dinvoker.test=effective-pom-artifact,effective-pom-multimodule-artifact verify: passes.mvn -Prun-its verify: BUILD SUCCESS, 33 ITs passed (2 skipped, unchanged), 26 unit tests pass.Skipped remote request for ...:3.5.3-SNAPSHOT/maven-metadata.xml locally installed metadata up-to-date, i.e. no remote access.