Rate this page:
LEGACY. This tutorial applies to Jira versions that have reached end of life.
Commercial users at any level receive access to Jira's source code (note, evaluation license holders are not permitted access to Jira's source code). This topic explains how to build this source code into a deployable Jira application.
Building all of Jira from source is only necessary if you need to make extensive modifications to Jira's source code and are using a WAR approach.
You should not need to rebuild Jira if:
If you want to browse through the Jira Core source code, you can download it from our Core source downloads page. You must have a valid Jira license and be logged in to my.atlassian.com with your Atlassian Id. You can download the Jira Software source code from the Software source downloads page. The Jira Core source code is also available in this location. The only difference is that the Jira Software source code has additional plugins available in the dependencySources directory.
Ensure you have JDK 1.8 or higher.
Ensure the JAVA_HOME environment variable is set and points to your JDK installation. For example,
> set JAVA_HOME=[your JDK installation directory]
Alternatively, the Windows environment variables can be configured by choosing .
export JAVA_HOME=[your JDK installation directory]
Extract Maven to an appropriate location on your operating system. For example,
On Windows, extract to:
On Mac/Linux, extract to:
Add Maven's bin directory to your path. For example,
> set PATH=C:\apache-maven-3.2.5\bin
Again, you can also set this via .
Install all of the following restricted third-party () libraries to your local Maven repository (), ensuring that you download the version specified below. All of these libraries are required to successfully build Jira from source. If any of these libraries are missing, the build process will fail.
Due to licensing restrictions, we can't distribute these libraries from Atlassian's public Maven repository. If you have built previous versions of Jira from source, you may already have some of these libraries in your local Maven repository.
Maven groupId and artifactId: javax.jms:jms.
jmxri and jmxtools
Maven groupId and artifactId: com.sun.jmx:jmxri and com.sun.jdmk:jmxtools.
(Download 'JNDI 1.2.1 Class Libraries' under 'Java Naming and Directory Interface 1.2.1')
Maven groupId and artifactId: jndi:jndi.
(Download 'Class Files 1.0.1B')
Maven groupId and artifactId: jta:jta.
(Download 'ojdbc7.jar' under 'Oracle Database 12g Release 1 (220.127.116.11.0) JDBC Drivers')
Maven groupId and artifactId: com.oracle:ojdbc7.
To install the libraries, download each one of them (using the links above) into a directory on your file system, for example in your home directory area.
The jmxri, jmxtools, jndi, and jta libraries are downloaded as archives and before you can install them into your local Maven repository, you'll need to either extract the key file, or change the libraries into the form.
For jmxri and jmxtools:
Open the directory and extract the and files from the subdirectory of the downloaded file.
cd $HOME/Downloads unzip jmx-1_2_1-ri.zip jmx-1_2_1-bin/lib/jmxri.jar jmx-1_2_1-bin/lib/jmxtools.jar
Open the directory and extract the file from the subdirectory of the downloaded file.
cd $HOME/Downloads unzip jndi-1_2_1.zip lib/jndi.jar
Open the directory and rename the file to .
cd $HOME/Downloads mv jta-1_0_1B-classes.zip jta-1_0_1B-classes.jar
To access this page, you'll need to log in as a user with a commercial license.
This will create a Jira source directory with the name , where X.Y.Z is your version of Jira. For example, .
In the Jira source directory, create the directory.
Set appropriate permissions for installing the node modules. In your Jira source directory, enter the following commands:
chmod a+x jira-project/conf/frontend/node chmod a+x ./jira-project/jira-components/jira-plugins/jira-post-upgrade-landing-page-plugin/src/main/frontend/bin/node chmod a+x ./jira-project/jira-components/jira-webapp/src/main/resources/johnson-page/bin/node
Install libraries into your local Maven repository. In your Jira source directory, enter the following commands:
mvn install:install-file -Dmaven.repo.local=localrepo -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=$HOME/Downloads/jms-1.1.jar mvn install:install-file -Dmaven.repo.local=localrepo -DgroupId=com.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -Dpackaging=jar -Dfile=$HOME/Downloads/jmx-1_2_1-bin/lib/jmxri.jar mvn install:install-file -Dmaven.repo.local=localrepo -DgroupId=com.sun.jdmk -DartifactId=jmxtools -Dversion=1.2.1 -Dpackaging=jar -Dfile=$HOME/Downloads/jmx-1_2_1-bin/lib/jmxtools.jar mvn install:install-file -Dmaven.repo.local=localrepo -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.1 -Dpackaging=jar -Dfile=$HOME/Downloads/jndi.jar mvn install:install-file -Dmaven.repo.local=localrepo -DgroupId=jta -DartifactId=jta -Dversion=1.0.1 -Dpackaging=jar -Dfile=$HOME/Downloads/jta-1_0_1B-classes.jar mvn install:install-file -Dmaven.repo.local=localrepo -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=18.104.22.168 -Dpackaging=jar -Dfile=$HOME/Downloads/ojdbc7.jar
Build Jira by executing the following Maven 2 command:
The build script will download several dependencies from Atlassian's public Maven repository.
On rare occasions, the build process may fail and you may receive an error similar to the one encountered when an Atlassian product is unable to install a plugin from Atlassian's public Maven repository. This problem is caused by the JVM being unable to access its default 'cacerts' file, which contains a certificate that trusts Atlassian's public Maven repository.
To resolve this problem:
A WAR file called (where X.Y.Z is your version of Jira), will be built in the subdirectory of your extracted Jira source directory.
For example, if the subdirectory created above (Extract the Jira source archive to a location of your choice) was , the WAR file will be found in:
You can also find an unpacked version of your Jira source build in the subdirectory of your extracted Jira source directory.
Learn about the IDE Connectors from the IDE Connector source code and documentation:
When building Jira from source, Maven will automatically fetch the binary (compiled) dependencies that it requires during the build process, so you don't have to do it manually (with the exception of the third-party libraries mentioned above (Third-party libraries)).
It is worth noting that Jira's source distribution not only ships with Jira's source code, it also includes the source of the internal Atlassian projects that Jira depends on (e.g. atlassian-bonnie, atlassian-core, etc.). The internal Atlassian dependencies for Jira's source distribution are made available as Maven-based archives. There will be a Maven-based archive for each dependency, named <dependencyname-version>-sources.jar. The only buildable part of the source package is Jira itself, not its dependencies.
Other dependencies are available on Atlassian's public repository. The source of these dependencies is usually available on the library's website (try googling for the library name), or can be identified in the SCM information of the relevant library.
If you have any questions regarding the build process, try searching/posting to the Atlassian Community, which is monitored by the development community, and by Atlassian as often as possible.
Rate this page: