Commercial users receive access to JIRA's source code. This topic explains how to build this source code back into a deployable JIRA application. Building JIRA from source is only necessary if need to make modifications to JIRA's source code. You should not need to rebuild JIRA if:
|
|
Building a JIRA WAR file from a JIRA Source release
- Ensure you have JDK 1.6 or higher and have a Subversion client installed.
- Download Maven 2.1.0 from the Apache archives of the Maven website.
We have not yet tested building JIRA from source using Maven 3 at this time. Extract Maven to an appropriate location on your operating system. For example,
On Windows, extract to:On Mac/Linux, extract to:
Set the M2_HOME environment variable. For example,
On Windows:
Alternatively, the Windows environment variables can be configured by choosing
My Computer >> Properties >> Advanced >> Environment Variables.On Mac/Linux:
Add Maven's bin directory to your path. For example,
On Windows:
You can set this via
My Computer >> Properties >> Advanced >> Environment Variablesagain if you wish.On Mac/Linux:
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.
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.Libraries
Maven groupId and artifactId
Version
Download URL
activation
javax.activation:activation
1.0.2
http://repository.jboss.org/nexus/service/local/repositories/deprecated/content/javax/activation/activation/1.0.2/activation-1.0.2.jar jms
javax.jms:jms
1.1
http://repository.jboss.org/nexus/content/groups/public-jboss/javax/jms/jms/1.1/ jmxri
and
jmxtoolscom.sun.jmx:jmxri
and
com.sun.jdmk:jmxtools1.2.1
http://www.oracle.com/technetwork/java/javase/tech/download-jsp-141676.html(Download 'JMX 1.2.1 Reference Implementation')
jndi
jndi:jndi
1.2.1
http://java.sun.com/products/jndi/downloads/index.html jta
jta:jta
1.0.1B
http://www.oracle.com/technetwork/java/javaee/jta/index.html(Download 'Class Files 1.0.1B')
mail
javax.mail:mail
1.3.2
http://www.oracle.com/technetwork/java/javamail-1-3-2-138617.html ojdbc6 com.oracle:ojdbc6 11.2.0.2.0 http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html (Download 'ojdbc6.jar' under 'Oracle Database 11g Release 2 (11.2.0.2.0) JDBC Drivers')
To install these restricted third party libraries:- Download each one (from its link above) into a directory on your file system, for example,
downloadsin your home directory area.
The jmxri, jmxtools, jndi, jta and mail libraries are downloaded as .zipfiles and before you can install these libraries into your local Maven repository, either:- a key
.jarfile must be extracted from them or - they need to be in
.jarform.
- For jmxri and jmxtools:
- On Windows:
Use Windows Explorer to enter thedownloadsdirectory and extract thejmxri.jarandjmxtools.jarfiles from thejmx-1_2_1-bin\libsubdirectory of thejmx-1_2_1-ri.zipfile. On Linux:
- On Windows:
- For jndi:
- On Windows:
Use Windows Explorer to enter thedownloadsdirectory and extract thejndi.jarfile from thelibsubdirectory of thejndi-1_2_1.zipfile. On Mac/Linux:
- On Windows:
- For jta:
- On Windows:
Use Windows Explorer to enter thedownloadsdirectory and rename thejta-1_0_1B-classes.zipfile tojta-1_0_1B-classes.jar On Mac/Linux:
- On Windows:
- For mail:
- On Windows:
Use Windows Explorer to enter thedownloadsdirectory and extract themail.jarfile from thejavamail-1.3.2subdirectory of thejavamail-1.3.2.zipfile. On Mac/Linux:
- On Windows:
- a key
Once you have downloaded, expanded and renamed each of these libraries, install them into your local Maven repository. For example, in your
downloadsdirectory, enter the following commands:
- Download each one (from its link above) into a directory on your file system, for example,
- Download the JIRA source archive from http://www.atlassian.com/software/jira/JIRASourceDownloads.jspa.
You will need to log in as a user with a commercial license to access this page.
- Extract the JIRA source archive to a location of your choice. This will create a subdirectory with the name
atlassian-jira-X.Y-source, where X.Y is your version of JIRA. For example,C:\atlassian-jira-4.3-source Change directory into this subdirectory and build JIRA by executing the following Maven 2 command. For example,
On Windows: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.
- A WAR file called
jira-webapp-dist-X.Y.war(where X.Y is your version of JIRA), will be built in thejira-project/jira-distribution/jira-webapp-dist/targetsubdirectory of your extracted JIRA source directory.
For example, if the subdirectory created above wasC:\atlassian-jira-4.3-source, the WAR file will be found in:
C:\atlassian-jira-4.3-source\jira-project\jira-distribution\jira-webapp-dist\target\jira-webapp-dist-4.3.war
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.Ysubdirectory of your extracted JIRA source directory. - The WAR file generated can now be installed into your application server to run the JIRA application you just built. For more information, refer to the JIRA WAR Configuration Overview. For specific installation instructions, you can follow these procedures, skipping stages 1 and 3:
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.). These internal Atlassian dependencies are also built from source when you build JIRA.
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, please post to the JIRA Development Forum, which is monitored continually by the development community, and by Atlassian as often as possible.
Compiling Single Class Patches
If you just want to compile one class (perhaps a service), we have a step-by-step guide for how to do this in IDEA. See How to Make a JIRA Patch for details.







8 Comments
Hide/Show CommentsJun 07, 2011
Anonymous
Hi Admin,
The link given above:
http://repository.jboss.org/maven2/javax/activation/activation/1.0.2/
is not working correctly giving an access denied error. I guess the directory has move somewhere else. Please update to save developers time.
Thanks,
Pawankumar Jajara
Jun 07, 2011
Giles Gaskell [Atlassian Technical Writer]
Hello Pawankumar,
This has been done.
Cheers,
Giles.
Jul 12, 2011
Anonymous
I can't download from this link:
http://repository.jboss.org/nexus/content/groups/public-jboss/javax/jms/jms/1.1/
thx!!!
Aug 05, 2011
Michael Stelzner
try this link: http://www.java2s.com/Code/Jar/STUVWXYZ/Downloadjavaxjms11jar.htm
Aug 24, 2011
Matt Doar (CustomWare)
Google shows it in several places including http://repository.jboss.org/maven2/javax/jms/jms/1.1/jms-1.1.jar
Aug 08, 2011
Anonymous
Hi Admin,
It is giving below error
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/G:/atlassian-jira-4.4-source/atlassian-jira-4.4-source/maven/lib/maven-2.1.0-uber.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.ExceptionInInitializerError
Thanks,
Vijay
Aug 09, 2011
Grigory Chernyshev
In order to successfully build jira you have to apply this patches:
Hope, it helps..
ps: thanks to sleberrigaud from #atlassiandev :)
Aug 16, 2011
Alexander Shchagin
Thanks, it really helps
Add Comment