Questions tagged [maven-invoker-plugin]

Maven Invoker Plugin

The Invoker Plugin is used to run a set of Maven projects. The plugin can determine whether each project execution is successful, and optionally can verify the output generated from a given project execution.

This plugin is in particular handy to perform integration tests for other Maven plugins. The Invoker Plugin can be employed to run a set of test projects that have been designed to assert certain features of the plugin under test.

The plugin has four goals meant to participate in the default build lifecycle:

  • invoker:install copies the project artifacts and dependencies of the main build into a dedicated local repository to prepare the execution of the selected sub projects in an isolated environment.
  • invoker:integration-test runs a set of Maven projects in a directory.
  • invoker:verify verifies the result of invoker:integration-test.
  • invoker:run runs a set of Maven projects in a directory and verifies the result. This is equivalent to running both invoker:integration-test and invoker:verify.

This last goal is intended for usage with the site lifecycle:

  • invoker:report integrates the results from previous builds into the site.

Reference :

https://maven.apache.org/plugins/maven-invoker-plugin/

34 questions
0
votes
1 answer

Howto cleanup build environment with maven-invoker-plugin

Sometimes, integration tests running with maven-invoker-plugin need some environment preparation. There is a good way of doing this setup - use setupIncludes configuration property to specify set of special integration modules, which will be…
long
  • 414
  • 4
  • 15
-1
votes
0 answers

The main class is unable to initialize Caused by: java.lang.NoClassDefFoundError: org/apache/maven/shared/invoker/MavenInvocationException

I am getting an error when I run the executable jar file. I have a main class in which I have used the invoker and it works, But after creating jar of the same code and running the jar is not working here Getting Error. I have the required…
-1
votes
1 answer

How to use Maven to encrypt a password — from Java?

I want to encrypt a password with maven, from within a Java program. Basically, I want to achieve the equivalent of calling mvn --encrypt-password p4ssw0rd, but without dropping to the command line. I've looked into Apache Maven Invoker. I've found…
SQB
  • 3,926
  • 2
  • 28
  • 49
-2
votes
1 answer

Add -pl option to maven invoker request

I have a little Java program which uses Maven Invoker to run some maven commands programmatically. The Maven routine is basically: InvocationRequest request = new DefaultInvocationRequest(); Invoker invoker = new…
Alvaro Pedraza
  • 1,176
  • 6
  • 20
  • 44
1 2
3