Permalink
Browse files

Build tweaks to make the dependency on IzPack optional for all target…

…s except dist
  • Loading branch information...
ndw committed Jan 2, 2012
1 parent 177f8d0 commit 2febf5e19bf44ce0fd659a4e09b053e37751991d
Showing with 16 additions and 4 deletions.
  1. +16 −4 build.xml
View
@@ -19,9 +19,20 @@
<property name="submit.password" value=""/>
<property name="izpack.dir" value="/Applications/IzPack"/>
- <taskdef name="izpack"
- classpath="${izpack.dir}/lib/compiler.jar"
- classname="com.izforge.izpack.ant.IzPackTask"/>
+
+ <available property="izpack.present"
+ classname="com.izforge.izpack.ant.IzPackTask"
+ classpath="${izpack.dir}/lib/compiler.jar"/>
+
+ <target name="izpacktool" if="izpack.present">
+ <taskdef name="izpack"
+ classpath="${izpack.dir}/lib/compiler.jar"
+ classname="com.izforge.izpack.ant.IzPackTask"/>
+ </target>
+
+ <target name="izpackmissing" unless="izpack.present">
+ <echo>Cannot find IzPack; request to build dist ignored.</echo>
+ </target>
<path id="build.classpath">
<fileset dir="${lib.dir}">
@@ -253,7 +264,8 @@
</javac>
</target>
- <target name="dist" depends="init,compile-everything,distrib">
+ <target name="dist" depends="init,compile-everything,distrib,izpacktool,izpackmissing"
+ if="izpack.present">
<delete file="${dist.dir}/install.xml"/>
<xslt in="resources/etc/install-proto.xsl" style="resources/etc/install-proto.xsl"

0 comments on commit 2febf5e

Please sign in to comment.