Quick Guide to Maven for Axis 2.0


Maven 2 is used as the build environment for Axis2. This document will provide a quick guide on how to use Maven with our project.


mvn clean Cleans all the content built so far in the target/ folder. This will not delete jars from your local repository.
mvn install
Run a full build.
mvn test
Runs our basic test suite.
mvn clean test
Cleans up, rebuilds everything from scratch, and then runs the basic test suite.
mvn -Dtest=MyTest install
run a single test (cd to the specific module say kernel before running this and don't use the package name of the class, just the class name).
mvn dependency:resolve
print dependencies under any module
mvn site
Generates the website in target/site/
mvn idea:idea
Generates IDEA .ipr, .iml and .iws project files.
mvn -Dtest=false
Builds Axis2 and skips all the tests.
mvn -U -Drelease clean install
Generate release artifacts.


  • The "-U" ensures that you fetch the latest snapshots
  • The "-Drelease" runs the pom.xml under modules/distribution. The zip's are created under modules/distribution/target
  • To skip tests use "-Dtest=false"
  • If you run into an exception, switch on printing of full exception using "-e"
  • If you want to see the versbose output, use "-X"

Ant helper for the m2 build

If you prefer to use Ant, we have a build.xml. Please note that there are 2 maven2 plugins that need to be built first when you update version # for Axis2. the ant build.xml takes care of that automatically. It builds axis2-aar-maven-plugin and axis2-mar-maven-plugin before it runs the main build.

ant clean" cleans up
ant install" runs the build
ant deploy" deploys artifacts in apache m2 snapshots repo
ant -Doffline=true clean" offline clean up
ant -Doffline=true install" offline build
ant -Dskip=true install" run the build, but skip the tests
ant -Dskip=true install" run the build, but skip the tests
ant -Dskip=true deploy" deploys artifacts, but skip the tests
ant -Doffline=true -Dskip=true install" run the build in the offline and skips the tests