Building JIRA from source

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:

  • You need to change many JSP files. JSP files are the template files for many JIRA webpages. They can also be more easily changed directly in the standalone JIRA installation directory.
  • Create a JIRA plugin that adds functionality to JIRA. For more information, read the JIRA Plugin Guide. Changes and enhancements to JIRA's functionality can often be made with JIRA plugins without requiring core JIRA source code modifications.
  • Recompiling a small number of source files can be done using the instructions in the standalone external-source directory.

(tick) Tip: 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 with your Atlassian Id. You can download the JIRA Software source code (this does not contain the JIRA Core source code) from the Software source downloads page.

 On this page:

Before you begin

  • Be aware that the procedures described on this page are not included in our Atlassian Support Offerings and consequently Atlassian can not guarantee support for them . This material is provided for your information only and using it is done so at your own risk.
  • The following instructions were tested for JIRA 7.2.0.
  • There is a known issue where the Workflow Designer source is missing from the JIRA source code (see JRA-29615) - please keep this is mind when building JIRA from source.

Building a JIRA WAR file from a JIRA Source release

  1. Ensure you have JDK 1.8 or higher.
  2. Download Maven 3.2.5 or higher from the Apache archives of the Maven website.
  3. Ensure JAVA_HOME environment variable is set and points to your JDK installation. For example,
    On Windows:

    > set JAVA_HOME=[your JDK installation directory]

    Alternatively, the Windows environment variables can be configured by choosing My Computer >> Properties >> Advanced >> Environment Variables.

    On Mac/Linux:

    export JAVA_HOME=[your JDK installation directory]
  4. Extract Maven to an appropriate location on your operating system. For example,
    On Windows, extract to:


    On Mac/Linux, extract to:

  5. Add Maven's bin directory to your path. For example,
    On Windows:

    > set PATH=C:\apache-maven-3.2.5\bin

    You can set this via My Computer >> Properties >> Advanced >> Environment Variables again if you wish.

    On Mac/Linux:

    export PATH=$PATH:/usr/local/apache-maven-3.2.5/bin

  6. Install all of the following restricted third party (.jar) libraries to your local Maven repository (.m2), 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.
    (info) Due to licensing restrictions, we are unable to distribute these third party 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


    Download URL




    jmxri and jmxtools

    com.sun.jmx:jmxri and com.sun.jdmk:jmxtools





    1.2.1 (Download 'JNDI 1.2.1 Class Libraries')





    (Download 'Class Files 1.0.1B')

    ojdbc7 (Download 'ojdbc7.jar' under 'Oracle Database 12g Release 1 ( JDBC Drivers')

    To install these restricted third party libraries:

    1. Download each one (from its link above) into a directory on your file system, for example, downloads in your home directory area.
      (warning) The jmxrijmxtoolsjndi, and jta libraries are downloaded as .zip files and before you can install these libraries into your local Maven repository, either:
      • a key .jar file must be extracted from them or
      • they need to be in .jar form.
      1. For jmxri and jmxtools:
        • On Windows:
          Use Windows Explorer to enter the downloads directory and extract the jmxri.jar and jmxtools.jar files from the jmx-1_2_1-bin\lib subdirectory of the file.
        • On Linux:

          cd $HOME/Downloads
          unzip jmx-1_2_1-bin/lib/jmxri.jar jmx-1_2_1-bin/lib/jmxtools.jar
      2. For jndi:
        • On Windows:
          Use Windows Explorer to enter the downloads directory and extract the jndi.jar file from the lib subdirectory of the file.
        • On Mac/Linux:

          cd $HOME/Downloads
          unzip lib/jndi.jar
      3. For jta:
        • On Windows:
          Use Windows Explorer to enter the downloads directory and rename the file to jta-1_0_1B-classes.jar
        • On Mac/Linux:

          cd $HOME/Downloads
          mv jta-1_0_1B-classes.jar
  7. Download the JIRA Core source archive from our Core source downloads page. The JIRA Software source archive can be downloaded from the Software source downloads page.
    (info) You will need to log in as a user with a commercial license to access this page. 
  8. Extract the JIRA source archive to a location of your choice. This will create a subdirectory with the name atlassian-jira-X.Y.Z-source, where X.Y.Z is your version of JIRA. For example, C:\atlassian-jira-7.2.0-source
  9. In JIRA source directory, create 'localrepo' directory. 

  10. 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 -DartifactId=ojdbc7 -Dversion= -Dpackaging=jar -Dfile=$HOME/Downloads/ojdbc7.jar
  11. Change directory into this subdirectory and build JIRA by executing the following Maven 2 command. For example,
    On Windows:

    C:\atlassian-jira-7.2.0-source\> build.bat

    On Mac/Linux:


    The build script will download several dependencies from Atlassian's public Maven repository.

    On rare occasions, however, 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:

    • Try one of the solutions mentioned in the Confluence Knowledge Base article: Unable to Install Plugin Due to Maven SSL .
    • If that does not resolve the problem, you may have a 'jssecacerts' file which does not contain a certificate that trusts Atlassian's public Maven repository. If a 'jssecacerts' file is present in your JVM, the 'cacerts' file may be ignored.

  12. A WAR file called jira-webapp-dist-X.Y.Z.war (where X.Y.Z is your version of JIRA), will be built in the jira-project/jira-distribution/jira-webapp-dist/target subdirectory of your extracted JIRA source directory. 

    For example, if the subdirectory created above was C:\atlassian-jira-7.2.0-source, the WAR file will be found in:

    (info) An unpacked version of your JIRA source build can also be found in the jira-project/jira-distribution/jira-webapp-dist/target/jira-webapp-dist-X.Y.Z subdirectory of your extracted JIRA source directory.
  13. The WAR file generated can now be installed into your application server to run the JIRA application you just built.

Developing using the IDE Connectors

Learn about the IDE Connectors from the IDE Connector Documentation.

Obtaining the source of JIRA's dependencies

When building JIRA from source, Maven will fetch the binary (compiled) dependencies that it requires automatically during the build process, so you do not have to do it manually (with the exception of the third party libraries mentioned above).

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 Answers, which is monitored by the development community, and by Atlassian as often as possible.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport