[weld-commits] Weld SVN: r5919 - examples/trunk.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Sun Feb 21 09:17:47 EST 2010


Author: pete.muir at jboss.org
Date: 2010-02-21 09:17:46 -0500 (Sun, 21 Feb 2010)
New Revision: 5919

Modified:
   examples/trunk/build.xml
Log:
only deploy datasource if it exists

Modified: examples/trunk/build.xml
===================================================================
--- examples/trunk/build.xml	2010-02-21 14:12:09 UTC (rev 5918)
+++ examples/trunk/build.xml	2010-02-21 14:17:46 UTC (rev 5919)
@@ -21,20 +21,18 @@
    <property name="pom.file" value="pom.xml" />
 
    <property name="type" value="war" />
-
-   <condition property="war">
-      <equals arg1="${type}" arg2="war" />
-   </condition>
-   <condition property="ear">
-      <equals arg1="${type}" arg2="ear" />
-   </condition>
-
    <condition property="artifact.target.dir" value="${basedir}/target">
       <equals arg1="${type}" arg2="war" />
    </condition>
    <condition property="artifact.target.dir" value="${basedir}/ear/target">
       <equals arg1="${type}" arg2="ear" />
    </condition>
+   
+   <property name="ds.file" location="${basedir}/${example.name}-ds.xml" />
+   
+   <condition property="deploy.ds">
+      <available file="${ds.file}"/>
+   </condition>
 
    <property name="artifact.dir" value="${artifact.target.dir}/${example.name}" />
 
@@ -78,12 +76,12 @@
       </maven>
    </target>
 
-	<target name="deploy.datasource">
-		<copy todir="${jboss.home}/server/default/deploy" file="${artifact.dir}/../../../${example.name}-ds.xml"/>
+	<target name="deploy.datasource" if="deploy.ds">
+		<copy todir="${jboss.home}/server/default/deploy" file="${ds.file}" />
 	</target>
 	
-	<target name="undeploy.datasource">
-		<delete file="${jboss.home}/server/default/deploy/${example.name}-ds.xml" failonerror="false" />
+	<target name="undeploy.datasource" if="deploy.ds">
+		<delete file="${jboss.home}/server/default/deploy/${example.name}-ds.xml" />
 	</target>
 	
    <target name="explode" depends="check.jboss.home, package, deploy.datasource">



More information about the weld-commits mailing list