This document provides instructions for using and extending the ANT based build for the AXIS C++ project.
Preparing system
Getting necessary third party software
Getting a CVS checkout
Property Files
Running the ANT build
Adding an extra platform
To use the ANT based build you will need to install the following:
[ANT INSTALL DIR]/lib
.Before running ANT the following environment variables need to be set:
ANT_HOME
- location of ant installationJAVA_HOME
- location of java installationPATH
- to include [ANT_HOME]/bin
and [JAVA_HOME]/bin
.
Axis Cpp Developers can use either Xerces-c or the Expat XML Parsers to build the Axis Cpp.
Expat XML Parser
You can get expat binaries from http://sourceforge.net/projects/expat/.
Xerces-C XML Parser
You can get Xerces-C binaries from http://xerces.apache.org.
Visit http://ws.apache.org/ Click on
“axis” and then on “CVS Repository” to find details on how to access the
CVS Repository.
In short summary:
Anyone can checkout the source code from our anonymous CVS server. To
do so, simply use the following commands (if you are using a GUI CVS
client, configure it appropriately):
cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic
login
password: anoncvs
cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout ws-axis
The checkout of the repository will be created in the current directory
in a folder named “ws-axis
”
The checked out folder ws-axis will be referred to as [CHECKOUT_HOME]
from this point on.
To aid in the portability of the ANT scripts, a number of property files are used. The script will decide which to use based on the platform in which it is currently running. The property files are found in ws-axis/c
with the following naming convention:
build.[platform].properties
A number of example property files are provided for Windows, Linux, AIX and Solaris, tt is intended that you update these files to suit your development and buid environment. This includes location of third party software dependencies and target packaging structure.
Having carried out the instructions above, the running of the ant build is simply a matter of typing the following at a command prompt:
ant
This will carry out the following:
To remove artefacts from a previous build use the following command:
ant clean
The AXIS community would greatly appreciate your input, if you're working on a platform not currently supported by the ANT scripts.
Below, are the steps required to add an additional platform;
pre-init
target, eg:<condition property="linux"> <os name="Linux"/> </condition>
initialize
target, eg: <condition property="platform" value="Linux"> <isset property="linux"/> </condition>
ws-axis/c
to match your platform. This uses the naming convention build.[platform].properties
, where platform is as specified in step 2.compiler
definition for platform, include a condition check for the correct platform, eg: <compiler id="Linuxgcc" name="g++" if="linux"> <compilerarg value="-Wall"/> <compilerarg value="-Wshadow"/> <compilerarg value="-g"/> <compilerarg value="-O2"/> <defineset> <define name="ENABLE_AXIS_EXCEPTION"/> <define name="HAVE_CONFIG_H"/> <define name="PIC"/> </defineset> <includepath path="${dir.include}"/> </compiler>Note: Compilers may extend one another, which can be useful if an additional platform uses the same compiler, but maybe only small variations in the parameters.
linker
definition for platform, include a condition check for the correct platform, eg: <linker id="LinuxLinker" name="g++" libtool="true" if="linux"> <linkerarg value="-g"/> <libset libs="stdc++"/> </linker>Note: As for compilers, linkers may extend one another.
compiler
and linker
to the cc
task within compileAxisClient
, compileAxisTransport
and compileAxisXMLParser
targets, eg: <cc outfile="${dir.bin}/${transportLibraryName}" objdir="${dir.objects}" exceptions="true" failonerror="false" outtype="shared" multithreaded="true"> <!-- Compilers --> <compiler refid="Linuxgcc"/> <compiler refid="AIXxlc"/> <compiler extends="VisualC++"> <defineset> <define name="AXISTRANSPORTDLL_EXPORTS"/> </defineset> </compiler> <!-- Linkers --> <linker refid="LinuxLinker"/> <linker refid="AIXLinker"/> <linker extends="VisualC++Linker"> <syslibset libs="wsock32"/> </linker> <!-- Files to compile --> <fileset dir="${dir.src}"> <include name="transport/axis/*.cpp"/> <!-- The following files need to be excluded --> <exclude name="transport/axis/SecureChannel.cpp"/> </fileset> </cc>