jaxws/build-defs.xml
changeset 5836 0ca88d5cdd40
parent 5516 d5307370d017
child 9063 937a014028a6
--- a/jaxws/build-defs.xml	Thu Jun 17 17:18:55 2010 -0700
+++ b/jaxws/build-defs.xml	Thu Jun 17 17:19:58 2010 -0700
@@ -55,9 +55,36 @@
     <drop-import name="jaxws_src"/>
     <drop-import name="jaf_src"/>
     <!-- <drop-import name="jaxws_tests"/> -->
+    
+    <!-- Fail and print helpful messages if source does not exist. -->
+    <target name="-src-help">
+      <fail message="${failed.url.src.message}">
+	<condition>
+	    <and>
+                <not>
+                    <and>
+	                <available file="${jaxws_src.src.dir}" type="dir"/>
+                        <available file="${jaf_src.src.dir}" type="dir"/>
+	            </and>
+	        </not>
+	        <istrue value="${allow.downloads}"/>
+	    </and>
+	</condition>
+      </fail>
+      <fail message="${failed.nourl.src.message}">
+	<condition>
+            <not>
+                <and>
+	            <available file="${jaxws_src.src.dir}" type="dir"/>
+                    <available file="${jaf_src.src.dir}" type="dir"/>
+	        </and>
+	    </not>
+	</condition>
+      </fail>
+    </target>
 
-    <!-- Special build area preparation. -->
-    <target name="-drop-build-prep" depends="init, -init-src-dirs">
+    <!-- Special build area setup. -->
+    <target name="-drop-build-setup" depends="init, -init-src-dirs">
         <mkdir dir="${build.classes.dir}"/>
         <copy todir="${build.classes.dir}">
             <fileset dir="${primary.src.dir}"
@@ -99,7 +126,7 @@
 
     <!-- Source directory selection. -->
     <target name="-init-src-dirs"
-	    depends="init, -use-drop">
+	    depends="init, -use-drop,-src-help">
         <echo message="Using primary.src.dir=${primary.src.dir}"/>
         <pathconvert property="src.list.id" refid="src.dir.id"/>
         <echo message="Using src.dir.id=${src.list.id}"/>