This page last changed on Sep 26, 2006 by jnolen.

The first time you set out to develop, you will need to make sure you have the supporting environment set up.

  1. Java Development Kit
  2. Maven
  3. Application Server
  4. Database
  5. Subversion

Java Development Kit (JDK)

Any of the following should work:

Follow the installation instructions for your choice and platform.

If you're planning to distribute your work to the Confluence user community, we strongly encourage you to use JDK 1.4 instead of 1.5. We make sure that Confluence is compatible with JDK 1.4, and many Confluence users still run on the older JVM. If you're developing for your own use only, you can use the JDK version your internal Confluence instance is running on.

Maven 1.0.2

Quoting its homepage, "Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information."

Both Confluence and Jira are set up to use Maven. And although it's not a requirement, most of the open-source plugins in the Developer Subversion Repository also use Maven. This guide assumes you will be using Maven for your plugins.

Currently the builds use Maven 1. Maven 2 support is in progress.

  1. Download and install Maven 1.0.2
  2. Set up your environment variables:
    • Define $MAVEN_HOME in your shell config
    • Add $MAVEN_HOME/bin to your path
  3. Create the Maven repository:
    • $MAVEN_HOME/bin/install_repo.sh $HOME/.maven/repository

Application Server Setup

You can use the Atlassian-IDEA Maven plugin to configure deployment environments for Resin 2, Resin 3, Tomcat 5.5.x and Orion 2. You can run on any or all of these appservers. Unless you're testing compatibility, you probably only need one. Resin seems to be the most popular, but Tomcat is the basis for the standalone dist, so either of those seem like good choices.

Tomcat Installation

  1. Download & install Tomcat 5.5.x
  2. If you want to run Tomcat 5.5 on a 1.4 JDK, download the Compatibility package and install it.

Resin 3 Installation

  1. Download & install Resin 3.0.x (see also jira documentation)

Resin 2 Installation

  1. Download & install Resin 2.1.x (see also jira documentation)

Orion 2 Installation

  1. Download & install Orion 2.0.x (see also jira documentation)

Database Setup (optional)

While both JIRA and Confluence come with the HSQLDB file-based database, it is sometimes useful to have a non-file-based database for development - it's faster and it's easier to find out what's going on inside. However, there are other cases where it is completely appropriate to stick with the HSQLDB as provided. If you want to use the standalone database, you can skip this step.

If you're using a database other than HSQLDB, then you need to create a database and a user which can access that database. If you're using HSQLDB, skip this step.

A wide variety of databases are supported. MySQL 4.1 is used in this example. Follow a similar procedure for your database of choice.

  1. Download & install MySQL 4.1.
  2. Make sure the database is running and will restart after reboot.
  3. Create a new database (eg. 'confdb').
  4. Create a new username/password (eg. 'confuser'/'confuser').
  5. Grant the new user full rights on the new database.
  6. Download & install the database driver into $TOMCAT_HOME/common/lib, $RESIN_HOME/lib, $RESIN3_HOME/lib and/or $ORION_HOME/???.

Subversion (optional)

Atlassian hosts a Subversion repository for developers to contribute open-source plugins. If you want to contribute your plugin, or get the latest version of helpful development resources, installing a subversion client is recommended.

Most modern IDEs include some support for Subversion, but you can also install the command-line client. This can also be helpful if the IDE's implementation doesn't quite do what you expected. You can find out where to get a command-line client (and other types of clients too) here:

http://subversion.tigris.org/project_packages.html

What's Next?

Now that the basic development environment is ready, we need to the the IDE (Integrated Development Environment) set up. Development can be done with any Java development environment. At Atlassian, we prefer IntelliJ's IDEA, and our instructions follow that path. We also have some user-contributed documentation about Developing with Eclipse.

Document generated by Confluence on Mar 22, 2007 21:01