jvanzyl 02/01/22 06:13:18
Modified: . build-test.xml build.xml default.properties
src/java/org/apache/turbine Resolver.java
Log:
- adding optional aspects for development purposes, they should be
non-invasive i.e. if don't have aspectj installed the build and
testing cycle should work as expected.
Revision Changes Path
1.9 +17 -2 jakarta-turbine-3/build-test.xml
Index: build-test.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-3/build-test.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- build-test.xml 17 Jan 2002 16:43:22 -0000 1.8
+++ build-test.xml 22 Jan 2002 14:13:18 -0000 1.9
@@ -8,6 +8,7 @@
<property file="build.properties" />
<!-- Set default values for the build -->
<property file="default.properties" />
+ <property file="aspects.properties" />
<!-- Construct compile/run-time classpath -->
<path id="classpath">
@@ -26,6 +27,10 @@
<pathelement location="${tidy.jar}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${build.dest}"/>
+
+ <!-- AspectJ Runtime Jar -->
+ <pathelement location="${aspectjrt.jar}"/>
+
</path>
<!-- ================================================================== -->
@@ -235,6 +240,8 @@
<copy file="${log4j.jar}" todir="${build.dir}/rttest/lib"/>
<copy file="${stratum.jar}" todir="${build.dir}/rttest/lib"/>
<copy file="${velocity.jar}" todir="${build.dir}/rttest/lib"/>
+
+ <antcall target="copy-aspectj-runtime"/>
<war
warfile="${out.test.dir}/test.war"
@@ -249,8 +256,16 @@
<exclude name="**/CVS/*"/>
<exclude name="**/WEB-INF/web.xml"/>
</fileset>
- </war>
- </target>
+ </war>
+ </target>
+
+ <target
+ name="copy-aspectj-runtime"
+ if="test.with.aspects">
+
+ <copy file="${aspectjrt.jar}" todir="${build.dir}/rttest/lib"/>
+
+ </target>
<!-- =================================================================== -->
<!-- Prepare directories and variables for running the tests -->
1.20 +43 -6 jakarta-turbine-3/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-3/build.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- build.xml 21 Jan 2002 13:49:43 -0000 1.19
+++ build.xml 22 Jan 2002 14:13:18 -0000 1.20
@@ -19,6 +19,7 @@
<property name="src.adapter.dir" value="${src.dir}/adapter"/>
<property name="final.name" value="${project}-${version}"/>
<property name="final.dir" value="../${final.name}/"/>
+ <property name="src.aspects.dir" value="${src.dir}/aspects"/>
<!-- Build classpath -->
<path id="classpath">
@@ -38,6 +39,12 @@
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${commons-util.jar}"/>
<pathelement location="${stratum.jar}"/>
+
+ <!-- AspectJ Jars for non-invasive use of aspects -->
+ <pathelement location="${aspectjrt.jar}"/>
+ <pathelement location="${aspectjtools.jar}"/>
+
+ <!-- Required for auto jar updating -->
<pathelement location="tdk.jar"/>
</path>
@@ -361,9 +368,10 @@
<!-- Compiles the source directory -->
<!-- ================================================================== -->
- <target name="compile"
- depends="prepare, prepare-jsp"
- description="--> compiles the source code">
+ <target
+ name="compile"
+ depends="prepare, prepare-jsp"
+ description="--> compiles the source code">
<javac
srcdir="${build.src}"
@@ -385,13 +393,42 @@
</target>
+ <!-- =================================================================== -->
+ <!-- A S P E C T C O M P I L E -->
+ <!-- =================================================================== -->
+ <target
+ name="acompile"
+ depends="prepare">
+
+ <!-- Move aspects into the build cycle -->
+ <copy todir="${build.src}/org" filtering="yes">
+ <fileset dir="${src.aspects.dir}/org">
+ <include name="**/*.java"/>
+ </fileset>
+ </copy>
+
+ <taskdef
+ name="ajc"
+ classname="org.aspectj.tools.ant.taskdefs.Ajc"/>
+
+ <ajc srcdir="${build.src}"
+ destdir="${build.dest}"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}">
+ <classpath refid="classpath"/>
+ </ajc>
+
+ </target>
+
<!-- ================================================================== -->
<!-- Compiles the source directory and creates a .jar file -->
<!-- ================================================================== -->
- <target name="jar"
- depends="compile"
- description="--> generates the turbine.jar file (default)">
+ <target
+ name="jar"
+ depends="compile"
+ description="--> generates the turbine.jar file (default)">
<jar
jarfile="${build.dir}/${final.name}.jar"
1.11 +6 -0 jakarta-turbine-3/default.properties
Index: default.properties
===================================================================
RCS file: /home/cvs/jakarta-turbine-3/default.properties,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- default.properties 18 Jan 2002 03:33:57 -0000 1.10
+++ default.properties 22 Jan 2002 14:13:18 -0000 1.11
@@ -66,3 +66,9 @@
# optional and if omitted will default to 8080. This is used when you don't
# want to interfere with a running servlet engine on port 8080.
test.port=8182
+
+# -------------------------------------------------------------------
+# A S P E C T S
+# -------------------------------------------------------------------
+aspectjrt.jar = ${aspectj.home}/aspectjrt.jar
+aspectjtools.jar = ${aspectj.home}/aspectjtools.jar
1.2 +1 -4 jakarta-turbine-3/src/java/org/apache/turbine/Resolver.java
Index: Resolver.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/Resolver.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Resolver.java 13 Nov 2001 19:45:08 -0000 1.1
+++ Resolver.java 22 Jan 2002 14:13:18 -0000 1.2
@@ -54,17 +54,14 @@
* <http://www.apache.org/>.
*/
-
import org.apache.turbine.modules.Module;
-
/**
* This interface is used to to allow users to plug in
* their own resolver. The default algorithm is in DefaultResolver.java.
* @author <a href="mailto:[EMAIL PROTECTED]">Mike Haberman</a>
- * @version $Id: Resolver.java,v 1.1 2001/11/13 19:45:08 mikeh Exp $
+ * @version $Id: Resolver.java,v 1.2 2002/01/22 14:13:18 jvanzyl Exp $
*/
-
public interface Resolver
{
public void init()
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>