Introduction

This document provides information on how to use Git to get a GitHub 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 GitHub (Git)

The Axis2 development team uses GitHub (Git) for source control.

Checkout Axis2 from Git

To check out the latest version of Axis2 from the Foundation's GitHub repository, you must use the following URL:

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

  1. Run git clone <repository URL> axis2 where the repository URL from the previous list.
  2. This step will check out the latest version of the Axis2 Java codebase to a directory named "axis-axis2-java-core".

Installing Maven 3

Axis2's build is based on Maven 3. 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.