Maven plugin

Maven plugin is a plugin that simplifies building and packaging Jars for projects that use the Maven (mvn) tooling. It is equivalent to running the following command:

mvn package

The maven-parameters key passes arguments to the mvn package command. The parameter can also configure any command-line arguments. All values are passed after the initial package command, delimited by spaces.

The maven-use-wrapper key leverages Maven wrapper files provided by the project to run the package command. It replaces the default Maven executable with the project’s mvnw file, to where the package command becomes ./mvnw package.

After a successful build, this plugin will:

  1. Create bin/ and jar/ directories in $CRAFT_PART_INSTALL.

  2. Find the java executable provided by the part and link it as $CRAFT_PART_INSTALL/bin/java.

  3. Hard link the .jar files generated in $CRAFT_PART_BUILD to $CRAFT_PART_INSTALL/jar.

Keys

This plugin provides the following unique keys.

maven-parameters

Type: list of strings

Used