</antcall>
<!-- TODO : remove call -->
<antcall target="filter-tools-jar" />
+ <antcall target="aspectjweaver.jar" />
</target>
+
+ <target name="aspectjweaver.jar"
+ description="pull out the subset of aspecttools.jar needed for load-time weaving">
+ <!--
+ TODO : get rid of this!
+ Temp hack ahoy. Open up the aspectjtools.jar to a temp
+ location and then do a re-jar of it including only the
+ stuff we want to be in there.
+ -->
+ <mkdir dir="${aj.dist.dir}/tools_tmp"/>
+ <unjar dest="${aj.dist.dir}/tools_tmp"
+ src="${aj.dist.dir}/tools/lib/aspectjtools.jar"/>
+ <jar manifest="${aj.dist.dir}/tools_tmp/META-INF/MANIFEST.MF"
+ destfile="${aj.dist.dir}/tools/lib/aspectjweaver.jar">
+ <fileset dir="${aj.dist.dir}/tools_tmp">
+ <include name="org/aspectj/lang/**"/>
+ <include name="org/aspectj/runtime/**"/>
+ <include name="org/aspectj/asm/**"/>
+ <include name="org/aspectj/bridge/**"/>
+ <include name="org/aspectj/util/**"/>
+ <include name="org/aspectj/weaver/**"/>
+ <include name="org/aspectj/apache/bcel/**"/>
+ <include name="copyright.txt"/>
+ <include name="META-INF/**"/>
+ </fileset>
+ </jar>
+ <delete dir="${aj.dist.dir}/tools_tmp" />
+ </target>
+
<target name="filter-tools-jar">
<!--
location="${aspectj.lib.dir}/aspectjrt.jar"/>
<property name="aspectjtools.jar"
location="${aspectj.lib.dir}/aspectjtools.jar"/>
+ <property name="aspectjweaver.jar"
+ location="${aspectj.lib.dir}/aspectjweaver.jar"/>
<!-- created directories -->
<property name="classes.dir"
<java classname="tracing.ExampleMain"
fork="true">
<classpath>
- <pathelement path="${aspectjrt.jar}"/>
- <pathelement path="${aspectjtools.jar}"/>
+ <pathelement path="${aspectjweaver.jar}"/>
</classpath>
<jvmarg line="-showversion"/>
<sysproperty key="java.system.class.loader" value="org.aspectj.weaver.WeavingURLClassLoader"/>
\r
-This directory contains a script "aj" to demonstrate load-time weaving. Java\r
-classes on the CLASSPATH are loaded and woven with aspects on the ASPECTPATH.\r
+The bin directory of your AspectJ distribution contains a script "aj" to \r
+perform load-time weaving. Java classes on the CLASSPATH are loaded and \r
+woven with aspects on the ASPECTPATH. \r
This feature is only supported on JDK 1.4 and later.\r
\r
--To compile the tracing example--\r