]> source.dussan.org Git - aspectj.git/commitdiff
fix for Bugzilla Bug 73369
authoracolyer <acolyer>
Thu, 21 Oct 2004 12:38:55 +0000 (12:38 +0000)
committeracolyer <acolyer>
Thu, 21 Oct 2004 12:38:55 +0000 (12:38 +0000)
   Create a jar file that can be used for load-time weaving...

build/build.xml
docs/dist/doc/examples/build.xml
docs/dist/doc/examples/ltw/README
lib/build/build.jar

index 44cef9762e6c58842f5716f1a73591795e124890..dc7c9c9450a103280c9e88b758eebca24617e557 100644 (file)
@@ -360,7 +360,37 @@ To use testing client jar in tests,
          </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">
        <!--
index 779bea19595acf0ab8b48ac166d43246430b5d20..5dbea8f19e0ab971663ef0fd5f6836553446eec3 100644 (file)
@@ -73,6 +73,8 @@
             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"/>
index bbeb56290e313a2ff5e0621a0b8f79f5ea4bba79..92011019ece0af99cdd7128f33e1dc7d214c2132 100644 (file)
@@ -1,6 +1,7 @@
 \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
index 6cc8007b1ed4ab78adf3c1d8b418a27827308744..1b80b4b9db8e43ae69487c6694b6012b183a00e4 100644 (file)
Binary files a/lib/build/build.jar and b/lib/build/build.jar differ