]> source.dussan.org Git - aspectj.git/commitdiff
bug 53209 - inpathDirCopyFilter doc updates and tests
authorwisberg <wisberg>
Tue, 22 Mar 2005 21:27:08 +0000 (21:27 +0000)
committerwisberg <wisberg>
Tue, 22 Mar 2005 21:27:08 +0000 (21:27 +0000)
docs/devGuideDB/antsupport.xml
docs/test/antScriptTest/build.xml
docs/test/antScriptTest/build/binary-input/ignore.txt [new file with mode: 0644]
docs/test/antScriptTest/ec/inpathDirSrc/InpathFile.java [new file with mode: 0644]

index 71d9235636d546d9d5da51aac08458093a8157de..900107bbb647591ad02344f204cfbf9ea41d7d94 100644 (file)
                        <row>
                                <entry><para>copyInjars
                                </para></entry>
-                               <entry><para>                                           
+                               <entry><para>
+                               (Deprecated/ignored; ajc does this.)                                            
                                If true, copy all non-.class files from input jar(s) 
                                to the output jar or destination directory after the 
                                compile (or incremental compile) completes.
                                The pattern should be compatible with an Ant fileset excludes filter; 
                                when using this, most developers pass 
                                <literal>**/CVS/*,**/*.java</literal> to exclude any CVS directories 
-                               or source files.
-                               </para></entry>
+                               or source files. 
+                               See <literal>inpathDirCopyFilter</literal>.
+                               Requires <literal>destDir</literal> or <literal>outJar</literal>.
+                               </para></entry>
+                       </row>
+                       <row>
+                               <entry><para>inpathDirCopyFilter
+                               </para></entry>
+                               <entry>
+                                       <para> When set, copy all files from the inpath directories 
+                                               to the output jar or destination directory except those 
+                                               specified in the filter pattern. The pattern should be 
+                                               compatible with an Ant fileset excludes filter; when 
+                                               using this, most developers pass 
+                                               <literal>**/CVS/*,**/*.java,**/*.class</literal> to 
+                                               exclude any CVS directories, source files, or unwoven 
+                                               .class files. (If <literal>**/*.class</literal> is not 
+                                               specified, it will be prepended to the filter.) See 
+                                               <literal>sourceRootCopyFilter</literal>. (Note that ajc 
+                                               itself copies all resources from input jar/zip files on 
+                                               the inpath.) Requires <literal>destDir</literal> or 
+                                               <literal>outJar</literal>.</para>
+                               </entry>
                        </row>
                        </tbody>
                </tgroup>
                </para>
              </listitem>
              <listitem>
-               <para>Reads all the sources from two directories;
+               <para>Reads all the source files from two directories;
                </para>
              </listitem>
              <listitem>
-               <para>Reads extrinsic module bytecode as input jar for weaving;
-               </para>
+                       <para>Reads binary .class files from input jar and directory; 
+                               </para>
              </listitem>
              <listitem>
                <para>Uses a binary aspect library for persistence;
                </para>
              </listitem>
              <listitem>
-               <para>Copies resources from the input jar and source directories into the application jar.
-               </para>
+                       <para>Copies resources from the source directories and binary input 
+                               jar and directories to the application jar. </para>
              </listitem>
            </orderedlist>
                <para>
                <![CDATA[
   <target name="build-test" >
     <iajc outjar="${home.dir}/output/application.jar" 
-            injars="${home.dir}/build/module.jar"
-            copyInjars="true"
             sourceRootCopyFilter="**/CVS/*,**/*.java"
+            inpathDirCopyFilter="**/CVS/*,**/*.java,**/*.class"
             incremental="true" >
       <sourceroots>
         <pathelement location="${home.dir}/ec/project/src"/>
         <pathelement location="${home.dir}/ec/project/testsrc"/>
       </sourceroots>
+      <inpath>
+        <pathelement location="${home.dir}/build/module.jar"/>
+        <pathelement location="${home.dir}/build/binary-input"/>
+      </inpath>
       <aspectpath>
         <pathelement location="${home.dir}/ec/int/persist.jar"/>
       </aspectpath>
index 2a7b00d82680bc1c5c1ddaf60cecfbdc73b32d31..7f875625c4d165394ba66fb0fbdda43b8ae209c6 100644 (file)
@@ -61,6 +61,8 @@
 
        <target name="clean" depends="init">
                <delete quiet="on">
+                       <fileset dir="${home.dir}/build/binary-input"
+                       excludes="ignore.txt"/>
                        <fileset dir="${home.dir}"
                                includes="ec/int/persist.jar,
                                                build/module.jar,
                        fork="${fork.iajc}"
                        sourceroots="${home.dir}/ec/module/src"
                        classpath="${home.dir}/tools/aspectj/lib/aspectjrt.jar"/>
+               <mkdir dir="${home.dir}/build/binary-input"/>
+           <iajc destdir="${home.dir}/build/binary-input"
+                       failonerror="true"
+                       fork="${fork.iajc}"
+                       sourceroots="${home.dir}/ec/inpathDirSrc"
+                       classpath="${home.dir}/tools/aspectj/lib/aspectjrt.jar"/>
        </target>
        
   <target name="build-test" depends="init,taskdef,setup"
        description="test Ant script from the devguide">
-       <!-- copy this from the Ant section of the rendered devguide -->
+       <!-- copy below from the Ant section of the rendered devguide -->
        <!-- in eclipse, must run forked and not incremental -->
-    <iajc outjar="${home.dir}/output/application.jar" 
-            injars="${home.dir}/build/module.jar"
-            copyInjars="true"
-                       fork="${fork.iajc}"
-            sourceRootCopyFilter="**/CVS/*,**/*.java"
-            incremental="false" >
-      <sourceroots>
-        <pathelement location="${home.dir}/ec/project/src"/>
-        <pathelement location="${home.dir}/ec/project/testsrc"/>
-      </sourceroots>
-      <aspectpath>
-        <pathelement location="${home.dir}/ec/int/persist.jar"/>
-      </aspectpath>
-      <classpath>
-        <pathelement location="${home.dir}/tools/aspectj/lib/aspectjrt.jar"/>
-      </classpath>
-    </iajc>
-    
-    <java classname="org.smart.app.Main">
-      <classpath>
-        <pathelement location="${home.dir}/tools/aspectj/lib/aspectjrt.jar"/>
-        <pathelement location="${home.dir}/ec/int/persist.jar"/>
-        <pathelement location="${home.dir}/output/application.jar"/>
-      </classpath>
-    </java>
-  </target>
 
+      <iajc outjar="${home.dir}/output/application.jar" 
+              sourceRootCopyFilter="**/CVS/*,**/*.java"
+              inpathDirCopyFilter="**/CVS/*,**/*.java,**/*.class"
+              incremental="true" >
+        <sourceroots>
+          <pathelement location="${home.dir}/ec/project/src"/>
+          <pathelement location="${home.dir}/ec/project/testsrc"/>
+        </sourceroots>
+        <inpath>
+          <pathelement location="${home.dir}/build/module.jar"/>
+          <pathelement location="${home.dir}/build/binary-input"/>
+        </inpath>
+        <aspectpath>
+          <pathelement location="${home.dir}/ec/int/persist.jar"/>
+        </aspectpath>
+        <classpath>
+          <pathelement location="${home.dir}/tools/aspectj/lib/aspectjrt.jar"/>
+        </classpath>
+      </iajc>
+      
+      <java classname="org.smart.app.Main">
+        <classpath>
+          <pathelement location="${home.dir}/tools/aspectj/lib/aspectjrt.jar"/>
+          <pathelement location="${home.dir}/ec/int/persist.jar"/>
+          <pathelement location="${home.dir}/output/application.jar"/>
+        </classpath>
+      </java>
+    </target>
 </project>
diff --git a/docs/test/antScriptTest/build/binary-input/ignore.txt b/docs/test/antScriptTest/build/binary-input/ignore.txt
new file mode 100644 (file)
index 0000000..c7d48fb
--- /dev/null
@@ -0,0 +1 @@
+ignore - just to avoid CVS trimming empty directories.
diff --git a/docs/test/antScriptTest/ec/inpathDirSrc/InpathFile.java b/docs/test/antScriptTest/ec/inpathDirSrc/InpathFile.java
new file mode 100644 (file)
index 0000000..729709f
--- /dev/null
@@ -0,0 +1,2 @@
+
+public class InpathFile {}
\ No newline at end of file