Migrate core ITs from maven-verifier to maven-executor - #445
Open
slachiewicz wants to merge 4 commits into
Open
slachiewicz wants to merge 4 commits into
slachiewicz wants to merge 4 commits into
Conversation
maven-verifier is deprecated (apache/maven-verifier#186); the Verifier is now the in-repo org.apache.maven.it.Verifier on maven-executor, as on master. Artifact paths are computed locally, without the toolbox plugin (apache/maven-executor#44).
maven-verifier kept this overload alongside the Map<String,String> one and at least one IT (MavenITmng0768OfflineModeTest) still calls it with a Properties instance, which does not satisfy Map<String,String>.
spotless:apply removed the now-redundant org.apache.maven.it.Verifier / ResourceExtractor imports the sed-based migration left behind (Verifier, VerificationException and ResourceExtractor all live in the tests' own org.apache.maven.it package) and reflowed one line in Verifier.java.
…rgument The prior execute() prepended "-l <logFileName>" to the CLI arguments to get Maven's own log-file flag to populate the log. maven-verifier's ForkedLauncher/Embedded3xLauncher never did that: they redirected the actual process stdout/stderr into the log file directly, which is what lets MavenITmng3183LoggingToFileTest (which adds its own "-l maven.log" argument) still see an empty captured stdout. Restored that behavior via ExecutorRequest's stdOut/stdErr, buffered per-stream to avoid the maven-executor pump threads closing a shared stream out from under each other, then written into the log file after execution. Caught by upstream CI on PR #446 (run 35591231728): 876/877 core-it-suite tests passed, this one failed.
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.
maven-verifier is deprecated (apache/maven-verifier#186); the Verifier used by the core ITs is now the in-repo
org.apache.maven.it.Verifier, built on maven-executor, the same way apache/maven's owncore-it-support/maven-it-helperdoes on master. Artifact and local-repository paths are computed locally rather than through a plugin execution, so running the suite does not require downloading a third-party plugin (apache/maven-executor#44).core-it-support/maven-it-sampleandmaven-it-sample-archetypestill referencemaven-verifierin their POMs; both are template projects outside the reactor and are left as they are.Verified: CI (
./mvnw -B clean install -Prun-its,embedded -Dmaven.repo.local=pwd/repo, 18-job matrix: ubuntu/macos/windows × JDK 8/11/17/21/25/26) → Tests run: 867, Failures: 0, Errors: 0, Skipped: 41, all jobs green.