The maven plugin

This plugin is useful for building parts that use maven.

The maven build system is commonly used to build Java projects. The plugin requires a pom.xml in the root of the source tree.

This plugin is only available to core22 and core18 based snaps. See Base snaps for details.

base: core22 and base: core18

This plugin uses the following plugin-specific keywords:

  • maven-options: An array of maven command line options.

    Example:

     YourJavaApp:
      plugin: maven
      source: https://github.com/apache/tomcat.git
      source-tag: TOMCAT_9_0_5
      source_tag: trunk
      source-type: git
      maven-parameters:
        [-DskipTests=true, -Dsomarg=false]
    

For examples, search GitHub for projects already using the plugin.

ⓘ This is a snapcraft plugin. See Snapcraft plugins and Supported plugins for further details on how plugins are used.

Small off-topic: Could you change the thread’s title? :slight_smile: Thank you!

1 Like

Done

1 Like

I never cood spell :slight_smile:

I know this is old but are the available options documented somewhere? The example shows “source-tag: trunk” but I saw on github somebody using source-branch.

The source-branch and source-tag options are documented here: https://snapcraft.io/docs/snapcraft-parts-metadata

1 Like