Install Ant: download the ant package
tar zvxf apache-ant-1.9.4-bin.tar.gz
#in .bashrc file#Ant
export ANT_HOME=/home/chase/runnable/apache-ant-1.9.4export CLASSPATH=${ANT_HOME}/lib:${CLASSPATH}:.
export PATH=${ANT_HOME}/bin:${PATH}
Install Ivy: download the latest Ivy package "apache-ivy-2.4.0-rc1-bin.tar.gz" and unpack
tar zvxf apache-ivy-2.4.0-rc1-bin.tar.gz
it shows:
and then copy the jar to the ant/lib classpath:
chase@pc0:~/runnable/apache-ivy-2.4.0-rc1$ cp ivy-2.4.0-rc1.jar ../apache-ant-1.9.4/lib/
then Ant and Ivy is combined!!!!!!!!!!!
How to use Ant and Ivy together
for ant create a build.xml, for Ivy create an ivy.xml file. That is
this project is for building an xx.aj file. ant is for building and ivy is for reslove dependencies:
the build file is
AP01 Tracer-simple tracer
Targets
clean: Removes all bytecode.
build-all: Build and create JAR
Author: Klaus Marius Hansen
The ivy.xml is
The src folder is the .aj file: src/dk/diku/tracer/Tracer.aj
The test folder is empty. After run
$ant clean build-all
is becomes:
in the build folder :
in the lib folder:
Then the aspectj advices are weaved into the apsensor.jar file which can be used in other java files.