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
PATHandM2_HOMEenvironment 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-projectsubdirectory. Run one of the following, depending on your preferred IDE:
OR
- 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/classesdirectory 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:
...it will be available from:
To deploy this class, place it in:
...then restart JIRA.







10 Comments
Hide/Show CommentsJan 15, 2010
Tyrin Avery
When I do this I get an error that says:
-------------------------------------------------------------------------------
>> Error parsing project.xml 'C:\DemandwareStudio\workspace\atlassian\jira\project.xml'
>> ParseError at [row,col]:[1629,28]
Message: Unrecognised tag: 'm2-transitive'
-------------------------------------------------------------------------------
Mind you, I actually have maven 2 also installed. I can get it to build the project at the top of the source tree just fine. Also, this eclipse doesn't allow you create projects that are multiple layers under the workspace, so I don't know how you're supposed to keep the JIRA project tree intact.
Jan 17, 2010
Jeremy Largman [Atlassian]
Hi Tyrin,
I've posted a bug report with solution at JRA-20160.
Jan 23, 2010
Tyrin Avery
Can I just replace the compiled class in my installation or do I need to put it in the patch directory, similar to JIRA patches?
Jan 25, 2010
Jeremy Largman [Atlassian]
I've updated the page to describe how to deploy it. It goes in the classpath in the /classes directory.
Sep 24, 2010
Anonymous
Hi,
I need to edit the Jira 'Importer Source Code' specifically 'BugzillaImportBean.Java' - http://confluence.atlassian.com/display/JIRA040/Importing+Data+from+Bugzilla
I want ot edit Bugzilla to Jira mappings upon import, I have insalled Maven 1.0.1 and Maven 2.2.1. I've downloaded atlassian-jira-enterprise-4.0.1-source.
After running "maven war:webapp". I get a lot of errors in maven.xml file.
I tried ignoring the error and continue, I ran "maven idea" and opened project in [IntelliJ IDEA Community Edition 9.0.3]. After building the project I get a lot of errors due to missing classes.
I dont know what's wrong, please help me and point me to the right direction. Thanks
Sep 24, 2010
Jeremy Largman [Atlassian]
Make sure to correct project.xml if you're getting the parse error above. I've updated the page with some maven 2 instructions as well, as that's now included in the source distribution.
Sep 27, 2010
Anonymous
Hi Jeremy,
I tried the solution at JRA-20160 but my errors still exist.
The problem is upon running "maven war:webapp"; it prompts 'BUILD FAILED' and the error is in maven.xml file.
Can I know exactly what maven versions, idea versions, and jira versions this patch steps is confirmed working?
Sep 28, 2010
Jeremy Largman [Atlassian]
Please give a try in our forums. We'll need to know your exact error message and troubleshoot from there.
Sep 29, 2010
Jeremy Largman [Atlassian]
If you get a 'Failed to resolve artifact', try downloading the jar files directly: https://m2proxy.atlassian.com/repository/m1/
You can download them, then use the syntax in the error messages to get past this hurdle.
Another tip - using this settings.xml (it's in your ~/.m2 folder) might help from Example settings.xml.
May 26, 2011
Valentijn Scholten
JIRA 4.3.3 source, error when running eclipse:eclipse goal:
For a workaround see: http://forums.atlassian.com/thread.jspa?threadID=34952
Add Comment