How to Make a JIRA Patch
To make any substantial modifications or additions to JIRA's source, you should read Building JIRA from Source. This implies building a WAR and deploying this to your Application Server.
Making a Single Class Patch
This guide describes how to make a source code modification to a single class file.
- Download Maven 2.1.0 from the Apache archives of the Maven website.
- Set your
PATH
andM2_HOME
environment variables where you install Maven (and its /bin directory for the PATH).
Refer to the Building JIRA from Source documentation for details.
- Download JIRA source.
- Changed directory into your extracted JIRA source directory and then into its
jira-project
subdirectory. Run one of the following, depending on your preferred IDE:
mvn idea:idea
OR
mvn eclipse:eclipse
- Open the resulting project.
- From your IDE, build the project.
- From your IDE, open and compile a file. The compiled file will appear in the
target/classes
directory of the maven module that you are working on. If you are working with JIRA's core classes, this is likely to be in/jira-project/jira-components/jira-core/target/classes
Deploying the Patch
To deploy a patch, drop the file in the classpath from <jira-install>/WEB-INF/classes
. For example, if you compile the class:
com.atlassian.jira.appconsistency.integrity.check.SearchRequestRelationCheck
...it will be available from:
/jira-project/jira-components/jira-core/target/classes/com/atlassian/jira/appconsistency/integrity/check/SearchRequestRelationCheck.class
To deploy this class, place it in:
<jira-install>/WEB-INF/classes/com/atlassian/jira/appconsistency/integrity/check/SearchRequestRelationCheck.class
...then restart JIRA.