[izpack-users] Ant integration and substitution of variables

Richard Gomes richard.gomes at ciavox.com
Thu Jan 11 16:28:44 CET 2007


Hi guys,

I'm sorry for [maybe] a silly question from a newbie....

But I'd like to pass parameters from a Ant build.xml file to IzPack.

An exerpt of my build.xml:

<izpack input="${installer.izpack.srcfile}"
     output="${installer.dest.dir}/myapp-installer.jar"
     installerType="standard"
     basedir="${target.build}"
     izPackDir="${installer.izpack.home}/"/>

... and an exerpt of what I'm trying to do:

<installation version="1.0">

<!--
<properties>
     <property name="VERSION_MAJOR"     value="$version.major}"/>
     <property name="VERSION_MINOR"     value="$version.minor}"/>
     <property name="VERSION_REVISION"  value="$version.revision}"/>
     <property name="APP_NAME"          value="$installer.app_name}"/>
     <property name="APP_SHORT_NAME"    value="$installer.app_short_name}"/>
     <property name="PUBLISHER"         value="$installer.publisher}"/>
     <property name="PUBLISHER_URL"     value="$installer.publisher_url}"/>
</properties>
-->

<variables>
     <variable name="VERSION_MAJOR"     value="2"/>
     <variable name="VERSION_MINOR"     value="7"/>
     <variable name="VERSION_REVISION"  value="0.1"/>
     <variable name="APP_NAME"          value="Spark"/>
     <variable name="APP_SHORT_NAME"    value="spark"/>
     <variable name="PUBLISHER"         value="Jive Software"/>
     <variable name="PUBLISHER_URL"     value="http://www.jivesoftware.com/"/>
</variables>

<info>
     <appname>${APP_SHORT_NAME}</appname>
      
<appversion>${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}</appversion>
     <appsubpath>${PUBLISHER}/${APP_SHORT_NAME}</appsubpath>
     <url>${PUBLISHER_URL}</url>
     <javaversion>1.5</javaversion>
</info>

... As you can see I've tryed properties and variables.. but the  
values are not being substituted.


Any idea?

Kind Regards

Richard Gomes






-- 
Richard Gomes
mailto:richard.gomes at ciavox.com
http://www.ciavox.com/~rgomes
office:+44(20)7234-0312
mobile:+44(79)1774-4389









More information about the izpack-users mailing list