Applied some changes suggested by Felix Meschberger to fix a bug that
caused Maven to not be executed under Windows.
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@516042 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/build.xml b/build.xml
index 95b3180..c7b06c9 100644
--- a/build.xml
+++ b/build.xml
@@ -17,45 +17,55 @@
under the License.
-->
<project default="all">
- <target name="clean">
- <exec executable="mvn" failonerror="true">
+ <target name="init">
+ <condition property="mvn" value="mvn.bat">
+ <os family="dos" />
+ </condition>
+ <condition property="mvn" value="mvn">
+ <not>
+ <isset property="mvn" />
+ </not>
+ </condition>
+ </target>
+ <target name="clean" depends="init">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=bundle clean" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=osgi-bundle clean" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=ipojo-bundle clean" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=osgi-bundle-mosgi clean" />
</exec>
</target>
- <target name="install">
- <exec executable="mvn" failonerror="true">
+ <target name="install" depends="init">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=bundle install" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=osgi-bundle install" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=ipojo-bundle install" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=osgi-bundle-mosgi install" />
</exec>
</target>
- <target name="all">
- <exec executable="mvn" failonerror="true">
+ <target name="all" depends="init">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=bundle clean install" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=osgi-bundle clean install" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=ipojo-bundle clean install" />
</exec>
- <exec executable="mvn" failonerror="true">
+ <exec executable="${mvn}" failonerror="true">
<arg line="-Dpackaging=osgi-bundle-mosgi clean install" />
</exec>
</target>