Rate this page:
You should understand the basic contents and functions of the SDK before you develop your first add-on. On this page, you get a summary of the SDK contents, a very brief intro to Apache Maven, and you run an Atlassian application through the SDK. The following topics are covered:
Maven is a popular tool and you may already be using it. You don't need to be a Maven expert to use this tutorial. You do need to understand some Maven basics to develop with the SDK. Examine the contents of the SDK installation:
List the contents of the directory.
The SDK contains the following directories:
Contains the Apache Maven 2 installation. Maven is a popular build management tool. Atlassian built a suite tools around Maven called the Atlassian Maven Plugin Suite (AMPS). These tools automate many add-on development tasks.
Contains command-line wrappers for the most common AMPS calls. All of the commands start with the prefix.
Contains code repositories that the Atlassian SDK is dependent on. This directory is prepopulated during the SDK installation.
Take some time to list the contents of each of the three sub-directories.
Maven relies on the ability to navigate to external repositories URLs and obtain source packages required by your code. When you build an add-on such as a plugin using the SDK's commands, Maven is behind the scenes retrieving the latest Atlassian source files from Atlassian's public repositories. Atlassian preconfigures the location of these repositories in the file.
If you're doing your development behind a corporate firewall, you may need to connect to the Internet through an HTTP proxy. If you know you do not have a firewall, skip this procedure. If you know your company requires you to use an HTTP proxy, you need to configure proxy settings in the file. Do the following:
Ask your system administrator to provide you with the following information:
The proxy address protocol://host:port, for example our.company:8080.
a username/password required for access
Edit the file in your favorite editor.
Edit the element and add the values provided by your system administrator.
When you are done, the element looks similar to the following:
1 2 3 4 5 6 7 8 9 10 11 12
<proxies> <proxy> <id>myproxy</id> <active>true</active> <protocol>http</protocol> <host>proxy.somewhere.com</host> <port>8080</port> <username>proxyuser</username> <password>somepassword</password> <nonProxyHosts>*.google.com|ibiblio.org</nonProxyHosts> </proxy> </proxies>
Close and save the file.
At this point, you've configured your environment and you are set to begin developing. This tutorial shows you how to add a very simple plugin to JIRA. Before you begin writing code, you should use an command to run JIRA in standalone mode. You use the atlas-run-standalone command to start JIRA.
If you haven't already done so, open a command window and do the following:
Navigate to the root of your drive (Windows) or home directory (Linux).
Create a directory called .
Change directory to your newly created directory.
Start latest version of JIRA on default port of 2990, by entering the following:
atlas-run-standalone --product jira
After the command completes successfully you see a message similar to the following:
1 2 3 4 5 6 7 8 9 10
[INFO] Starting jira on the tomcat6x container on ports 2990 (http) and 52641 (rmi) [INFO] using codehaus cargo v1.2.3 [INFO] [cargo:start] [INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.2.3 for container tomcat6x [INFO] [stalledLocalDeployer] Deploying [/Users/manthony/atlastutorial/amps-standalone/target/jira/jira.war] to [/Users/manthony/atlastutorial/amps-standalone/target/container/tomcat6x/cargo-jira-home/webapps]... [INFO] [talledLocalContainer] Tomcat 6.x starting... [INFO] [talledLocalContainer] Tomcat 6.x started on port  [INFO] jira started successfully in 249s at http://localhost:2990/jira [INFO] Type Ctrl-D to shutdown gracefully [INFO] Type Ctrl-C to exit
The output message tells you the URL where JIRA was started.
Open a browser and enter the JIRA URL.
You should see the URL for your installation displayed in the run output. For example, you might see myhost.local:2990/jira or localhost:2990/jira depending on your environment. On successful launch, the browser displays the JIRA login page.
Enter for both the username and password.
Your browser displays the JIRA dashboard:
You'll notice in the Admin section the License that you are running is a .
When you issue the command, it creates a directory called in the current directory - in this case .
JIRA runs as a Tomcat web application on your -- the system on which you issue the command. So, the command actually runs a Maven build on your system. This build
The file contains the details such as the environment variables set and used during this process. You'll notice from this log file that the JIRA test instance relies on an HSQL database. You would never use an HSQL database in a production system.
When you run a standalone instance, you can make changes in the instance. The system remembers what you do between sessions. At this point, you should still have your standalone JIRA instance up and running. Make sure you are logged in and do the following:
Your browser should inform you that it could not get a connection to the server.
Restart JIRA standalone.
atlas-run-standalone --product jira
Log back in and locate your project.
The standalone instance has retained the data you created between restarts. This can be very useful when testing. You'll learn more about this later.
At this point, you have some basic understanding of the SDK. Enough to go ahead in the next tutorial section to create your own plugin project.
Rate this page: