openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r775344 - /openjpa/trunk/openjpa-examples/src/main/java/build.xml
Date Fri, 15 May 2009 21:11:20 GMT
Author: dwoods
Date: Fri May 15 21:11:20 2009
New Revision: 775344

URL: http://svn.apache.org/viewvc?rev=775344&view=rev
Log:
OPENJPA-1088 fix new all target for Windows users

Modified:
    openjpa/trunk/openjpa-examples/src/main/java/build.xml

Modified: openjpa/trunk/openjpa-examples/src/main/java/build.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-examples/src/main/java/build.xml?rev=775344&r1=775343&r2=775344&view=diff
==============================================================================
--- openjpa/trunk/openjpa-examples/src/main/java/build.xml (original)
+++ openjpa/trunk/openjpa-examples/src/main/java/build.xml Fri May 15 21:11:20 2009
@@ -36,10 +36,24 @@
         </fail>
     </target>
 
-    <target name="all">
-        <exec dir="${basedir}/hellojpa" executable="ant" />
-        <exec dir="${basedir}/relations" executable="ant" />
-        <exec dir="${basedir}/reversemapping" executable="ant" />
+    <target name="init" depends="init:discover, init:windows, init:unix">
+    </target>
+    <target name="init:discover">
+        <condition property="isWindows">
+            <os family="windows"/>
+        </condition>
+    </target>
+    <target name="init:windows" if="isWindows">
+        <property name="platform.script.ext" value=".bat"/>
+    </target>
+    <target name="init:unix" unless="isWindows">
+        <property name="platform.script.ext" value=""/>
+    </target>
+
+    <target name="all" depends="init">
+        <exec dir="${basedir}/hellojpa" executable="ant${platform.script.ext}"/>
+        <exec dir="${basedir}/relations" executable="ant${platform.script.ext}"/>
+        <exec dir="${basedir}/reversemapping" executable="ant${platform.script.ext}"/>
     </target>
 
     <path id="classpath"



Mime
View raw message