svn commit: r711141 - /ofbiz/trunk/common.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r711141 - /ofbiz/trunk/common.xml

doogie-3
Author: doogie
Date: Mon Nov  3 16:16:04 2008
New Revision: 711141

URL: http://svn.apache.org/viewvc?rev=711141&view=rev
Log:
Handle the case if the src dir doesn't exist.

Modified:
    ofbiz/trunk/common.xml

Modified: ofbiz/trunk/common.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/common.xml?rev=711141&r1=711140&r2=711141&view=diff
==============================================================================
--- ofbiz/trunk/common.xml (original)
+++ ofbiz/trunk/common.xml Mon Nov  3 16:16:04 2008
@@ -52,20 +52,27 @@
         <mkdir dir="${build.dir}/javadocs"/>
     </target>
 
-    <target name="jar" depends="classes">
+    <available property="_src-available" file="${src.dir}"/>
+    <fileset id="_src-extra-set" dir="." excludes="**"/>
+
+    <target name="_src-available" if="_src-available">
+        <fileset id="_src-extra-set" dir="${src.dir}">
+            <include name="**/*.properties"/>
+            <include name="**/*.xml"/>
+            <include name="**/*.bsh"/>
+            <include name="**/*.logic"/>
+            <include name="**/*.js"/>
+            <include name="**/*.js"/>
+            <include name="**/*.jacl"/>
+            <include name="**/*.py"/>
+            <include name="META-INF/**"/>
+        </fileset>
+    </target>
+
+    <target name="jar" depends="classes,_src-available">
         <jar jarfile="${build.dir}/lib/${name}.jar">
             <fileset dir="${build.dir}/classes"/>
-            <fileset dir="${src.dir}">
-                <include name="**/*.properties"/>
-                <include name="**/*.xml"/>
-                <include name="**/*.bsh"/>
-                <include name="**/*.logic"/>
-                <include name="**/*.js"/>
-                <include name="**/*.js"/>
-                <include name="**/*.jacl"/>
-                <include name="**/*.py"/>
-                <include name="META-INF/**"/>
-            </fileset>
+            <fileset refid="_src-extra-set"/>
             <!-- now add the NOTICE and LICENSE files to allow the jar file to be distributed alone -->
             <zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
         </jar>