Atlassian SDK atlas-run command fails with error Unsupported major.minor version
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This Knowledge Base article specifically refers to the Atlassian Plugin SDK which is not formally supported.
Problem
While attempting to run the atlas-run
command from the Atlassian Plugin SDK, whether its for Cloud or Server:
1
2
atlas-run-cloud
atlas-run-standalone
the build fails to complete.
The following appears in the console/terminal:
1
2
3
4
5
6
7
8
9
10
11
12
13
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.384 s
[INFO] Finished at: 2016-01-09T13:35:33+01:00
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-plugin:6.2.1:run-cloud (default-cli) on project standalone-pom:
Execution default-cli of goal com.atlassian.maven.plugins:maven-amps-plugin:6.2.1:run-cloud failed:
Unable to load the mojo 'run-cloud' in the plugin 'com.atlassian.maven.plugins:maven-amps-plugin:6.2.1' due to an API incompatibility:
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
com/atlassian/maven/plugins/amps/RunCloudMojo :
Unsupported major.minor version 52.0
Specifically, the error is:
1
Unsupported major.minor version 52.0
Diagnosis
Environment
JAVA_HOME has been set to a JAVA version that is incompatible with the installed SDK version.
Diagnostic Steps
To check for the JAVA installation that the Plugin SDK uses, run
atlas-version:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ atlas-version ATLAS Version: 6.2.2 ATLAS Home: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2 ATLAS Scripts: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/bin ATLAS Maven Home: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/apache-maven-3.2.1 AMPS Version: 6.2.1 -------- Executing: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/apache-maven-3.2.1/bin/mvn --version -gs /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/apache-maven-3.2.1/conf/settings.xml Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00) Maven home: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/apache-maven-3.2.1 Java version: 1.6.0_65, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: de_DE, platform encoding: MacRoman OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"
Specifically, refer to the
Java home:
text above.
Cause
JAVA_HOME has been set to a JAVA version that is incompatible with the installed SDK version, as the SDK by default uses the JAVA installation specified by the system's JAVA_HOME environment variable.
Solution
Resolution
Upgrade the system's JAVA installation to a newer version, or point JAVA_HOME to a newer version of JAVA.
ℹ️ As of time of writing, the latest SDK Version 6.2.2 requires JAVA 1.8 or higher.
You can also refer to this article for information on required JDK versions: https://developer.atlassian.com/display/DOCS/Set+up+the+SDK+Prerequisites+for+Linux+or+Mac
Was this helpful?