Question

I am currently trying to get started with the Atlassian SDK and I've installed it as it is described in the Atlassian SDK Documentation. But when I'm running a SDK-command, it doesn't work. For example, when I run the command

atlas-run-standalone --product jira

it fails with the following output:

Executing: "C:\Users\XXX\Programme\apache-maven-3.1.1\bin\mvn" com.atlassian.maven.plugins:maven-am
ps-plugin:4.2.20:run-standalone -gs C:\Users\XXX\atlassian-plugin-sdk\apache-maven/conf/settings.xm
l -Dproduct=jira
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-amps-plugin:4.2.20:run-standalone (default-cli) @ standalone-pom ---
[INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics.
[INFO] Although no personal information is sent, you may disable tracking by adding <allowGoogleTracking>false
</allowGoogleTracking> to the amps plugin configuration in your pom.xml
[INFO] Sending event to Google Analytics: AMPS:jira - Run Standalone
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.861s
[INFO] Finished at: Thu Apr 24 09:32:47 CEST 2014
[INFO] Final Memory: 16M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-plugin:4.2.20:run-standalone (
default-cli) on project standalone-pom: Execution default-cli of goal com.atlassian.maven.plugins:ma
ven-amps-plugin:4.2.20:run-standalone failed: An API incompatibility was encountered while executing
com.atlassian.maven.plugins:maven-amps-plugin:4.2.20:run-standalone: java.lang.NoSuchMethodError: o
rg.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSe
ssion;
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.atlassian.maven.plugins:maven-amps-plugin:4.2.20
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/XXX/.m2/repository/com/atlassian/maven/plugins/maven-amps-plugin/4
.2.20/maven-amps-plugin-4.2.20.jar
[ERROR] urls[1] = file:/C:/Users/XXX/.m2/repository/com/atlassian/core/atlassian-core/4.0/atlassian
-core-4.0.jar
# more [ERROR] urls[x] = ...
[ERROR] urls[130] = file:/C:/Users/XXX/.m2/repository/org/twdata/maven/mojo-executor/1.5.1/mojo-exe
cutor-1.5.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

Some further information to my machine:

  • Windows 7 Professional, x64
  • javac 1.7.0_45
  • JAVA_HOME is set, %JAVA_HOME%/bin has been added to PATH

And the information responded by the atlas-version command:

ATLAS Version:    4.2.20
ATLAS Home:       C:\Users\XXX\atlassian-plugin-sdk
ATLAS Scripts:    C:\Users\XXX\atlassian-plugin-sdk\bin
ATLAS Maven Home: C:\Users\XXX\atlassian-plugin-sdk\apache-maven
--------
Executing: "C:\Users\XXX\Programme\apache-maven-3.1.1\bin\mvn" --versi
n-plugin-sdk\apache-maven/conf/settings.xml
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-1
Maven home: C:\Users\XXX\Programme\apache-maven-3.1.1
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_45\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Was it helpful?

Solution

Have you set ATLAS_MVN to use your own installation of Maven? The Atlassian SDK doesn't support Maven 3.1+ in the 4.x releases due to an incompatible change in Maven itself (MNG-5354).

There is a fix (AMPS-1029); until upgrading, use Maven 3.0 or the mvn that's bundled with AMPS.

AMPS 5.0 has now been released (AMPS SDK 5.0.0 Release Notes) with that fix included, and support for Maven 3.1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top