Women in Technology

Hear us Roar

  An Introduction to Aspect-Oriented Programming with the Spring Framework, Part 2
Subject:   build script for running examples
Date:   2005-03-09 23:51:42
From:   RotterdamSam
Thanks for the article and the examples. Here is an ant build script that people could use to get them running quickly:


<?xml version="1.0"?>
<project name="springaoppart2" default="run" basedir=".">

<!--Edit properties in build.properties before running ant-->

<property file="build.properties"/>

<path id="all-libs">

<fileset dir="${springframework.dir}/lib">
<include name="**/*.jar"/>
<fileset dir="${springframework.dir}/dist">
<include name="*.jar"/>
<fileset dir="${xerces.dir}">
<include name="*.jar"/>


<target name="clean">
<delete dir="classes"/>
<delete file="springconfig.xml"/>

<target name="build" >

<mkdir dir="classes"/>

<javac destdir="classes"
deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="all-libs"/>

<copy todir=".">
<fileset dir="${src.dir}">
<include name="springconfig.xml"/>

<target name="run" depends="build">
<java classname="MainApplication">
<pathelement path="classes"/>
<pathelement path="."/>
<path refid="all-libs"/>


#change this to run different examples
src.dir=src/Around Advice with Proceed and changed args Example