Skip to content

Migrate core ITs from maven-verifier to maven-executor - #445

Open
slachiewicz wants to merge 4 commits into
maven-3.9.xfrom
agent/maven-executor-migration
Open

slachiewicz wants to merge 4 commits into
maven-3.9.xfrom
agent/maven-executor-migration

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

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 own core-it-support/maven-it-helper does 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-sample and maven-it-sample-archetype still reference maven-verifier in 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant