Rate this page:
Here you will find a list of Frequently Asked Questions about the 'Set up the Atlassian Plugin SDK and Build a Project' Tutorial.
You can check which version of JAVA you have installed on your system by opening a Terminal window and running the following command:
1
javac -version
If you're running the Oracle JAVA 8 you'll see a response like
1
javac 1.8.0_101
If you see an error like 'command not found' or just no response, then you'll need to install the Java SE Development Kit.
You can get this at Oracle Java SE Development Kit 8 Downloads.
You might come across the following error when you try to start up your plugin using the atlas-run
command if you have not changed to the directory with the plugin skeleton you created:
1 2 3 4 5 6 7 8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.135 s
[INFO] Finished at: 2016-09-30T15:29:49+10:00
[INFO] Final Memory: 5M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.6:run (default-cli): Goal requires a project to execute but there is no POM in this directory (/Users/mpaisley/Test). Please verify you invoked Maven from the correct directory. -> [Help 1]
Make sure you're in your plugin directory and make sure the pom.xml
file has been created.
You may see the following error if you are using the Oracle Java SE Development Kit 7 with the latest version of the Atlassian Plugin SDK:
1 2 3 4 5 6 7 8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.102 s
[INFO] Finished at: 2016-09-30T14:50:03+10:00
[INFO] Final Memory: 18M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-jira-plugin:6.2.9-SNAPSHOT:compress-resources (default-compress-resources) on project myPlugin: Execution default-compress-resources of goal com.atlassian.maven.plugins:maven-jira-plugin:6.2.9-SNAPSHOT:compress-resources failed: Unable to load the mojo 'compress-resources' in the plugin 'com.atlassian.maven.plugins:maven-jira-plugin:6.2.9-SNAPSHOT' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com/atlassian/maven/plugins/jira/JiraCompressResourcesMojo : Unsupported major.minor version 52.0
The latest version of the Atlassian Plugin SDK requires Oracle Java SE Development Kit 8.
You can check which version of JAVA you are using by entering the following command:
1
atlas-version
The output will look something like:
1 2 3 4 5 6 7 8 9 10 11 12 13
ATLAS Version: 6.2.9
ATLAS Home: /usr/local/Cellar/atlassian-plugin-sdk/6.2.4/libexec
ATLAS Scripts: /usr/local/Cellar/atlassian-plugin-sdk/6.2.4/libexec/bin
ATLAS Maven Home: /usr/local/Cellar/atlassian-plugin-sdk/6.2.4/libexec/apache-maven-3.2.1
AMPS Version: 6.2.6
--------
Executing: /usr/local/Cellar/atlassian-plugin-sdk/6.2.4/libexec/apache-maven-3.2.1/bin/mvn --version -gs /usr/local/Cellar/atlassian-plugin-sdk/6.2.4/libexec/apache-maven-3.2.1/conf/settings.xml
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-15T04:37:52+10:00)
Maven home: /usr/local/Cellar/atlassian-plugin-sdk/6.2.4/libexec/apache-maven-3.2.1
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"
Lines 10 and 11 in the above output show the Java version is 1.7.x rather than 1.8.x
You can download the install files for the latest version on the Oracle website at www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.
Follow the instructions on the Oracle website to install Java for your system.
The JAVA_HOME
environment variable specifies the location of the JDK on your system. For Windows users, the default directory is C:\Program Files\Java\jdk1.8.x_y
, where x_y is the Java JDK 8 version you have installed. To set JAVA_HOME:
C:\Program Files\Java\jdk1.8.x_y
folder on your system and copy the path to the folder.%JAVA_HOME%\bin
in the available space.Open a new Command Prompt window, and run the following command:
1 2
C:\Users\manthony>javac -version
javac 1.8.0_91
verify that your output is similar to what appears above.
The JAVA_HOME
environment variable specifies the location of the JDK on your system. On Mac OS X, if you accepted the defaults when you installed the JDK, this is /Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home
. On Linux, it may be /usr/local/jdk
, or a similar location. You should add the JDK's bin
directory to your PATH
environment variable as well. This ensures your environment is configured and can locate the javac
command.
To set your PATH
and JAVA_HOME
variables:
Edit the .bashrc
file in your home directory using your favourite editor (we use vi in this example).
1
host:~ test$ vi ~/.bash_profile
Add the following lines at the end of the file:
1 2 3
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.0_91.jdk/Contents/Home
export JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin
Save and close the file.
Enter the following at the command line to pick up your changes:
1
host:~ test$ source ~/.bash_profile
Verify you are now seeing the correct result when you enter the command javac -version
in terminal
1 2
host:~ test$ javac -version
javac 1.8.0_91
Still Stuck? Request support at Developer Technical Support Portal
Rate this page: