Skip to content

Run the "invoker" Maven executor through maven-executor - #1504

Draft
slachiewicz wants to merge 1 commit into
masterfrom
agent/maven-executor
Draft

slachiewicz wants to merge 1 commit into
masterfrom
agent/maven-executor

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Sep 21, 2026

Copy link
Copy Markdown
Member

maven-invoker is deprecated in favour of maven-executor (apache/maven-invoker#164). InvokerMavenExecutor, the default mavenExecutorId, keeps its id and behaviour but runs Maven with ForkedMavenExecutor on the release environment's Maven home: the invoker's setters become options (-X in debug, -B unless interactive, -Dmaven.repo.local, -f, -s for the encrypted settings copy), JAVA_HOME goes through the request's environment, additionalArguments are split with plexus-utils translateCommandline, the same splitting the forked executor uses, and the build's stdout and stderr reach the plugin's logger line by line as before. Interactive mode still hands System.in to the build.

Three ITs (MRELEASE-533, MRELEASE-618, MRELEASE-966) assert the invoker's debug line about a POM not named pom.xml; the executor logs the same sentence when it adds -f, and also the full command line at debug level.

Verified: mvn -Prun-its install → 55 ITs passed; maven-release-manager unit tests → 769 passed.

Not ready to merge until apache/maven-executor#50 is fixed. All 55 ITs run in batch mode. In interactive mode the executor is handed System.in, and maven-executor 1.0.0 waits for that stream to reach EOF before execute() returns, so an interactive release:prepare would hang after the forked build finishes. maven-invoker returned as soon as the process ended.

maven-invoker is deprecated (apache/maven-invoker#164). The executor keeps its
"invoker" id and behaviour: same options, the additional arguments split the way
the forked executor splits them, the build's output on the plugin's logger.
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