Description: Fix aspectj ant tasks.
Author: Damien Raude-Morvan <drazzib@debian.org>
Forwarded: not-needed
Last-Update: 2010-06-19
--- a/project-build/aspect/artifact.xml
+++ b/project-build/aspect/artifact.xml
@@ -24,10 +24,16 @@
 
 <!-- Other targets -->
 	<target name="compile.init" depends="ivy.init">
+<!--
 		<ivy:cachepath resolveId="ajc.classpath" pathid="ajc.classpath" organisation="org.aspectj"
 				module="com.springsource.org.aspectj.tools" revision="${org.aspectj.tools.version}" conf="runtime"
 				type="jar" inline="true" log="download-only"/>
+-->
+                <path id="ajc.classpath">
+                        <pathelement path="${ajc.classpath}"/>
+                </path>
+
 		<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" classpathref="ajc.classpath"/>
 	</target>
 
-</project>
\ No newline at end of file
+</project>
--- a/project-build/weaving-external/artifact.xml
+++ b/project-build/weaving-external/artifact.xml
@@ -32,7 +32,8 @@
 		<delete quiet="true" file="${source-jar.output.file}"/>
 		<mkdir dir="${source-jar.output.dir}"/>
 
-		<iajc inPathRef="external.classpath" aspectPathRef="aspects.classpath" classpathRef="compile.classpath"
+		<property name="internal.compile.classpath" refid="compile.classpath"/>		
+		<iajc inPathRef="external.classpath" aspectPathRef="aspects.classpath" classpath="${internal.compile.classpath}:/usr/share/java/aspectjrt.jar"
 				outJar="${jar.output.file}" source="${source.version}" checkRuntimeVersion="false" X="${aspectj.x}"/>
 		<antcall target="bundlor"/>
 		<copy tofile="${source-jar.output.file}">
@@ -49,9 +50,14 @@
 
 <!-- Other targets -->
 	<target name="compile.init" depends="ivy.init">
+<!--
 		<ivy:cachepath resolveId="ajc.classpath" pathid="ajc.classpath" organisation="org.aspectj"
 				module="com.springsource.org.aspectj.tools" revision="${org.aspectj.tools.version}" conf="runtime"
 				type="jar" inline="true" log="download-only"/>
+-->
+                <path id="ajc.classpath">
+                        <pathelement path="${ajc.classpath}"/>
+                </path>
 		<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" classpathref="ajc.classpath"/>
 
 		<ivy:cachepath resolveId="spring.ant.classpath" pathid="spring.ant.classpath"
--- a/project-build/weaving/artifact.xml
+++ b/project-build/weaving/artifact.xml
@@ -25,9 +25,15 @@
 
 <!-- Other targets -->
 	<target name="compile.init" depends="ivy.init">
+<!--
 		<ivy:cachepath resolveId="ajc.classpath" pathid="ajc.classpath" organisation="org.aspectj"
 				module="com.springsource.org.aspectj.tools" revision="${org.aspectj.tools.version}" conf="runtime"
 				type="jar" inline="true" log="download-only"/>
+-->
+                <path id="ajc.classpath">
+                        <pathelement path="${ajc.classpath}"/>
+                </path>
+
 		<taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties" classpathref="ajc.classpath"/>
 
 		<ivy:cachepath resolveId="spring.ant.classpath" pathid="spring.ant.classpath"
@@ -56,4 +62,4 @@
 		</bundlor:bundlor>
 	</target>
 
-</project>
\ No newline at end of file
+</project>
--- a/project-build/aspect/common.xml
+++ b/project-build/aspect/common.xml
@@ -25,7 +25,8 @@
 		<attribute name="output.dir"/>
 		<attribute name="resources.dir"/>
 		<sequential>
-			<iajc sourceroots="@{input.dir}" destDir="@{output.dir}" classpathRef="@{classpath.id}" source="${source.version}"
+			<property name="internal.classpath" refid="@{classpath.id}"/>
+			<iajc sourceroots="@{input.dir}" destDir="@{output.dir}" classpath="${internal.classpath}:/usr/share/java/aspectjrt.jar" source="${source.version}"
 					debug="${compile.debug}" debugLevel="${compile.debug.level}" checkRuntimeVersion="false"
 					aspectPathRef="aspects.classpath" X="${aspectj.x}"/>
 			<copy todir="@{output.dir}">
@@ -42,4 +43,4 @@
 		</sequential>
 	</macrodef>
 
-</project>
\ No newline at end of file
+</project>
--- a/project-build/aspect/quality.xml
+++ b/project-build/aspect/quality.xml
@@ -31,7 +31,8 @@
 		</path>
 		<test-compile classpath.id="test.compile.classpath" input.dir="${test.java.dir}" output.dir="${test.output.dir}"
 				resources.dir="${test.resources.dir}"/>
-		<iajc inPath="${test.output.dir}" aspectPathRef="test.aspect.path" classpathRef="test.compile.classpath"
+		<property name="internal.test.compile.classpath" refid="test.compile.classpath"/>
+		<iajc inPath="${test.output.dir}" aspectPathRef="test.aspect.path" classpath="${internal.test.compile.classpath}:/usr/share/java/aspectjrt.jar"
 				destDir="${test.output.dir}" source="${source.version}" checkRuntimeVersion="false" X="${aspectj.x}"/>
 
 		<path id="test.run.classpath">
@@ -66,9 +67,10 @@
 		</path>
 		<test-compile classpath.id="test.compile.classpath" input.dir="${test.clover.dir}" output.dir="${test.output.dir}"
 				resources.dir="${test.resources.dir}"/>
-		<iajc inPath="${test.output.dir}" aspectPathRef="test.aspect.path" classpathRef="test.compile.classpath"
+		<property name="internal.test.compile.classpath" refid="test.compile.classpath"/>
+		<iajc inPath="${test.output.dir}" aspectPathRef="test.aspect.path" classpath="${internal.test.compile.classpath}:/usr/share/java/aspectjrt.jar"
 				destDir="${test.output.dir}" source="${source.version}" checkRuntimeVersion="false" X="${aspectj.x}"/>
 		<delete dir="${clover.staging.dir}" quiet="true"/>
 	</target>
 
-</project>
\ No newline at end of file
+</project>
