All,

I felt it would be useful to have a target that builds only the src jar. The "build.jar" target that we have, builds the test and sample jars also.
I propose the attached patch which introduces a new target - "build.src.jar". The patch factors out the manifest task in a "manifest" target, which is used by both "build.jar" and "build.src.jar" targets.


Please let me know if the patch is OK.

Thanks,
Vishal
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-security/build.xml,v
retrieving revision 1.75
diff -u -r1.75 build.xml
--- build.xml   18 May 2004 11:49:22 -0000      1.75
+++ build.xml   9 Jun 2004 09:29:54 -0000
@@ -716,23 +716,27 @@
        </target>
 
     <!-- jars -->
-       <target name="build.jar"
-               depends="build.src,build.test,build.samples">
+       <target name="manifest">
 
                <mkdir dir="${dir.manifest}"/>
 
                <manifest file="${jar.manifest}" mode="replace">
-                       <attribute name="Built-By" value="${user.name}"/>
-                       <section name="${product.shortname}">
-                               <attribute name="Implementation-Title" 
-                                       value="${product.Name}"/>
-                               <attribute name="Implementation-Version" 
-                                       value="${product.Version} ${TODAY}"/>
-                               <attribute name="Implementation-Vendor" 
-                                       value="Apache Software Foundation"/>
-                       </section>
-               </manifest>
-               
+                        <attribute name="Built-By" value="${user.name}"/>
+                        <section name="${product.shortname}">
+                                <attribute name="Implementation-Title"
+                                        value="${product.Name}"/>
+                                <attribute name="Implementation-Version"
+                                        value="${product.Version} ${TODAY}"/>
+                                <attribute name="Implementation-Vendor"
+                                        value="Apache Software Foundation"/>
+                        </section>
+                </manifest>
+
+       </target>
+
+       <target name="build.jar"
+               depends="manifest,build.src,build.test,build.samples">
+
                <!-- Main Library -->
                <jar basedir="${dir.build.bin}" 
                        excludes="org/apache/xml/security/temp/**"
@@ -754,7 +758,19 @@
                        jarfile="${jar.tests}" 
                        manifest="${jar.manifest}"/>
 
-  </target>
+       </target>
+
+       <target name="build.src.jar"
+               depends="manifest,build.src">
+
+               <jar basedir="${dir.build.bin}" 
+                       excludes="org/apache/xml/security/temp/**"
+                       includes="**/LICENSE, **/NOTICE, org/apache/**, *.txt" 
+                       jarfile="${jar.library}" 
+                       manifest="${jar.manifest}"/>
+
+       </target>
+
 <!--
     <target name="build.jar"
             depends="env.mk.dirs" >

Reply via email to