Atlassian SDK and release plugin

Gert-Jan van de Streek

Gert-Jan van de Streek

Published: 22 July, 2014

Yesterday I wrote about the Maven release:prepare release:perform sequence mistakenly uploading a SNAPSHOT instead of the official release artifacts. This is a follow up specifically for users of the Atlassian SDK that bundles Maven version 3.2.1 (or earlier).

If you encounter this error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project xsdviewer: Execution default-cli of goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare failed: A required class was missing while executing org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare: org/apache/maven/scm/command/remoteinfo/RemoteInfoScmResult
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-release-plugin:2.2.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
...
...

The solution is to explicitly pick a newer version (minimum 2.3.2) for the release plugin:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.9</version>
</dependency>
</dependencies>
</plugin>

You might encounter the same error using plain Maven and specifically versions < 3.2.2. The fix should be the same, include the version number for the release plugin.

Did you enjoy reading?

Share this blog with your audience!