Modify the Plugin
Step 1. Update the organization details that appear on the Plugin
- You should still be in the myPlugin directory after shutting down JIRA.
- Open the
pom.xmlfile in your favourite editor.
Locate the <organization> element in the file. It should look something like this:
Update the element to include some personalized information, for example:
- Save and close the file.
- Return to the command prompt window, and enter atlas-run and wait for JIRA to start back up.
- Login if prompted
- Open the Manage add-ons page in your browser using the path: http://localhost:2990/jira/plugins/servlet/upm
- Expand the myPlugin plugin to see your changes.
- When you're finished, shutdown JIRA gracefully using Ctrl+D.
Step 2. Add a custom menu to JIRA
- Open the
/src/main/resources/atlassian-plugin.xmlfile from your
myPlugindirectory in your favourite text editor.
The atlassian-plugin.xml file will look something like this:
Next, in command prompt make sure you're in the
myPluginfolder and then run the following command:
You'll be prompted to choose a plugin module from a list of possible module types (check out Plugin Modules for more information).
Type 30 to select the
Web Sectionplugin module type.
Now, you'll be prompted to answer a few configuration questions, answer as follows:
At the moment the location
my-item-linkdoesn't exist, but we'll create that in the next step.
Next, you're prompted to enter another plugin module. Type Y to create another module.
Type 25 to select the
Web Itemplugin module and then answer the configuration questions as follows:
- When you are prompted to enter another Plugin Module, type N.
The system will complete the creation of the modules and you'll receive a confirmation that the build was successful.
Step 3. Customise the menu
Open the atlassian-plugin.xml file and you'll notice it has changed a little:
- In the web-section, delete the following:
- The phrase
- Save your changes to the file.
- Return to the Command Prompt window, run the
atlas-runcommand, and wait for JIRA to start up.
- Once you've logged in, you will see the new JIRA menu.
- Shut down JIRA using Ctrl+D.
Starting and stopping JIRA can take several minutes each time. QuickReload significantly reduces your plugin development iteration time, so in the next part of the tutorial, you'll learn how to use it to test a change to your plugin without restarting JIRA.