This page last changed on Apr 04, 2007 by david.soul@atlassian.com.

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
  6. IDE

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 or 1.6. 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 are free to use the JDK version your internal Confluence instance is running on.

Maven 2.0.5

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.

Confluence is now built using Maven2, and so the

  1. Download and install Maven 2.0.5
  2. Set up your environment variables:
    • Define $MAVEN_HOME in your shell config
    • Add $MAVEN_HOME/bin to your path

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 are 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

IDE

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.

JetBrains IntelliJ IDEA Installation

  1. Download & install the latest version of IDEA (5.0 or later).

Eclipse

  1. Download & install the latest version of Eclipse.

What's Next?

Now that we've (finally) got the pieces in place, the next stage is to get Confluence setup and running inside IDEA. How you do this will depend on whether or not you have access to the Confluence source code. Currently this is only available to commercial licensees. Choose your setup type:

Related topics

Increase memory for IDEA

Document generated by Confluence on May 01, 2007 19:27