Introduction

This document provides information on how to use SVN to get an SVN checkout/update, make commits to the repository, etc., in the process of contributing to Apache projects (specifically Axis2). Instructions on configuring IDEs for development and using Maven to build the project is also included here.

Working with Subversion (SVN)

The Axis2 development team uses Subversion (SVN) for source control. Subversion is a compelling replacement for CVS, developed under the auspices of the Tigris community and licensed under an Apache compatible license. To learn more about Subversion or to download the latest distribution, visit the Subversion project site. If you are looking for guidance on setting up and installing Subversion, please read the ASF Source Code Repositories page.

Checkout Axis2 from Subversion

To check out the latest version of Axis2 from the Foundation's Subversion repository, you must use one of the following URLs depending on your level of access to the Axis2 source code:

If you are a committer, make sure that you have selected an svnpasswd. To do this, you must log into svn.apache.org. For more information, please read the ASF Source Code Repositories page.

Once you have successfully installed Subversion, you can check out Axis2 trunk by following these steps:

  1. Run svn co <repository URL> axis2 where the repository URL is one of the URLs from the previous list.
  2. This step will check out the latest version of the Axis2 Java codebase to a directory named "axis2". The second parameter to the svn co selects a directory to create on your local machine. If you want to checkout Axis2 to a different directory, feel free to change axis2 to any other directory name.
  3. To update your working copy to the latest version from the repository, execute the svn update command.
  4. If you would like to submit a patch, you can execute svn diff to create a unified diff for submission to the Axis2 JIRA issue tracker.

Installing Maven 2

Axis2's build is based on Maven 2. Maven is a build system that allows for the reuse of common build projects across multiple projects. For information about obtaining, installing, and configuring Maven 2, please see the Maven project page. To use Maven to build the Axis2 project, Please install Maven2 and follow instructions here - Quick Guide to Maven for Axis 2.0.

Configuring your IDE

The Axis2 development team uses a variety of development tools from vi to emacs to Eclipse to Intellij/IDEA. The following section is not an endorsement of a specific set of tools, it is simply meant as a pointer to ease the process of getting started with Axis2 development.

Intellij IDEA

Type mvn idea:idea. Generates the necessary IDEA .ipr, .iml and .iws project files.

Eclipse

We recommend using maven-eclipse-plugin to import the Axis2 sources into Eclipse. This works best with the following combinations of versions and settings:

  • Early versions of Maven 2 have issues with non standard packagings (bundle, aar and mar in the case of Axis2) in multi-module builds. While this has no impact on the normal Maven build, it prevents the Maven Eclipse plugin from identifying modules with these packagings as Java projects. Therefore it is recommended to use Maven 2.2.x or 3.0.x to execute the Maven Eclipse plugin.
  • By default, the Maven Eclipse plugin only imports generated sources and resources created during the generate-sources and generate-resources phases, but fails to locate them if they are generated during the generate-test-sources and generate-test-resources phases. This is due to a limitation in Maven 2 (see MECLIPSE-37 for more information). Executing the eclipse:eclipse goal after the process-test-resources phase is also not enough because of MDEP-259. The best is to execute it after the install phase. The skipTests property can be used to skip the execution of the unit tests (maven.test.skip is not appropriate here because it also skips some of the goals configured in the generate-test-sources and generate-test-resources phases).

To summarize, use the following command to prepare the Axis2 sources for import into Eclipse:

mvn -DskipTests=true install eclipse:eclipse

As usual, before importing the projects into Eclipse, check that a Classpath Variable for M2_REPO is configured in Eclipse. Then select File > Import > Existing Projects into Workspace > Select root directory. Selecting the root of the Axis source discovers all the modules and allows them to be imported as individual projects at once.