Fork me on GitHub

exec:java-stop

Full name:

org.codehaus.mojo:exec-maven-plugin:3.8.0:java-stop

Description:

Stops the Java programs that exec:java runs in the background (async) in the current project: interrupts their threads, waits for them, closes their class loaders and restores the system properties. The goal fails if a program threw an exception, so that a failure in the background fails the build. It also fails when failOnLingeringThreads is set and a thread of the program is still alive after the interruption and the wait.

Without a program to stop it logs that and succeeds, even when startExecutionId names an execution that has none, so it is safe to bind when the start is skipped or does not run in the background.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 3.8.0.
  • Binds by default to the lifecycle phase: post-integration-test.

Optional Parameters

Name Type Since Description
<skip> boolean 3.8.0 Skip the execution.
Default: false
User Property: exec.skip
<startExecutionId> String 3.8.0 The id of the exec:java execution to stop. Without it every program that runs in the background in this project is stopped, the latest started first. An id without a program is not an error. On the command line the id of an execution is default-cli.
User Property: exec.startExecutionId

Parameter Details

<skip>

Skip the execution.
  • Type: boolean
  • Since: 3.8.0
  • Required: No
  • User Property: exec.skip
  • Default: false

<startExecutionId>

The id of the exec:java execution to stop. Without it every program that runs in the background in this project is stopped, the latest started first. An id without a program is not an error. On the command line the id of an execution is default-cli.
  • Type: java.lang.String
  • Since: 3.8.0
  • Required: No
  • User Property: exec.startExecutionId