有谁知道如何在ANT中将构建属性传递给izpack。
我在ANT中有一个可以正常工作的izpack安装,它工作得很好,但我必须记得手动输入一些东西,比如版本号等。它们在我的build.properties文件中。
提亚
发布于 2010-11-20 06:54:46
您可以在IzPack安装定义中使用@{}语法引用Ant属性:
<installation version="1.0">
<!-- Ant properties in this file can be referenced with @{},
otherwise use variables below in installer files with ${} -->
<info>
<appname>@{product.name}</appname>
<appversion>@{product.version}</appversion>
<uninstaller name="remove.task" path="${INSTALL_PATH}/Uninstall" write="yes"/>
</info>
...发布于 2011-05-20 19:32:36
似乎为了将所有项目属性传播到izpack编译器,您需要将inheritAll属性设置为"true“。
<izpack input="install-definition.xml"
output="${output.dir}/${product.short.name}-${product.version}-install.jar"
installerType="standard"
inheritAll="true"
basedir="${temp.dir}" />然后在安装定义文件中使用@{product.version}引用该属性
但是,我在文档中找不到它,所以它继承的可能不仅仅是属性。
发布于 2010-11-20 18:22:44
我找到了一个方法。我将安装复制到dist文件夹中,并在该位置进行替换。
<copy file="install.xml" todir="${output.dir}" overwrite="true">
<filterset>
<filter token="release.version" value="${release.version}"/>
</filterset>
</copy>稍后:
<target name="installer" description="Build installer" depends="all">
<izpack input="${output.dir}/install.xml" output="c:/temp/test.jar" basedir="${release.dir}"/>
</target>https://stackoverflow.com/questions/4226302
复制相似问题