#Maven

To use this plugin, you will have to make sure the mvn CLI is available in the environment. Our pmbot/bot:maven docker image embeds Maven 3.6 and the Open JDK 11.

Also, you will have to install your maven dependencies manually before running the pmbot CLI.

version: '1'
packageManagers:
  - packageManager:
      name: maven
      config:
        # ...

#Limitations of the current plugin

The current Maven plugin is only able to update dependencies for which the version is specified directly in the <version></version> tag of the dependency inside your pom.xml:

<dependency>
  <groupId>commons-io</groupId>
  <artifactId>commons-io</artifactId>
  <version>2.6</version>
</dependency>

If you do not specifiy a version:

<dependency>
  <groupId>commons-io</groupId>
  <artifactId>commons-io</artifactId>
</dependency>

or use properties

<dependency>
  <groupId>commons-io</groupId>
  <artifactId>commons-io</artifactId>
  <version>${commonsio.version}</version>
</dependency>

the plugin will not be able to update the dependency.

#bumpConfig

Configures how dependencies should be bumped. This is available because Go does not offer native support for semantic versioning. See the generic bump configuration which re-use for all package managers that don't natively offer this funtionality.

version: '1'
packageManagers:
  - packageManager:
      name: maven
      config:
        bumpConfig:
          # ...        

#settingsPath

Default:

  • .m2/settings.xml
  • ~/.m2/settings.xml

Path to a maven settings.xml file which contains credentials for private repositories. We visit all locations.

#Environment variables

#MAVEN_OPTS

We export this variable before running the mvn CLI:

export MAVEN_OPTS=$MAVEN_OPTS; mvn ...

#MAVEN_CLI_OPTS

This variable is passed to the mvn CLI as follows: mvn $MAVEN_CLI_OPTS