How do I Set up Apache Axis2 in Eclipse?
By Ruchith Fernando
- 3 Apr, 2006
A: A developer who plans to contribute to Apache Axis2 will find it very useful to set up the project in an Integrated Development Environment such as Eclipse. In this page the commonly asked question of how to set up Apache Axis2 in Eclipse IDE is answered.
The following steps will successfully take you through the process.
- Get an SVN checkout of Axis2 (https://svn.apache.org/repos/asf/webservices/axis2/trunk/java) into 'axis2' directory inside your eclipse workspace. Run the maven build on this source.
- Start a new Java project in eclipse and set the project name as 'axis2'. Now with the default settings in eclipse it will automatically pick up the existing project contents (directories etc).
- In the next step of the new java project wizard you can select the source directories that you want to mount. You can browse the directories and select all 'src' and 'test' directories in each maven module (axis2/java/modules/*). Note that in the case of the security module, there's an additional source directory named 'interop'.
- In step 3 you can also use the "Libraries" tab to add the jars that all modules depends on. Note that you will have to add all dependent jars required by the modules that you selected/added as source.
- There are three places in Axis2 where there is code that don't compile. The missing classes are code generated during the maven build.
- You can collect the code generated source of the security module - 'interop' source dir from '.../axis2/java/modules/security/target/interop/work/src' or you can code generate (XmlBeans) them with the ping.wsdl in the '.../axis2/java/modules/security/interop' dir and add them to your source in 'axis2/java/modules/security/interop' (Make sure you don't check in these classes when committing.)
- As for the integration module - 'test' source dir, you can exclude the 'samples' package and "org.apache.axis2.om" package from the source path.
Congratulations! Now you have successfully set up Axis2 in eclipse
In the case of compilation failures:
- Check whether you have imported all dependent jars
- Check whether you have set up the code generated classes properly.
For any further details and questions email to: firstname.lastname@example.org (Prefix subject with with [Axis2])
To subscribe to Apache Axis2 mailing list see here