ビルド プロパティを ANT の izpack に渡す方法を知っている人はいますか。
私は ANT に izpack をインストールして正常に動作していますが、build.properties ファイルにあるバージョン番号などを手動で入力することを忘れないでください。
ティア
ビルド プロパティを ANT の izpack に渡す方法を知っている人はいますか。
私は ANT に izpack をインストールして正常に動作していますが、build.properties ファイルにあるバージョン番号などを手動で入力することを忘れないでください。
ティア
@{}
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>
...
すべてのプロジェクト プロパティを 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} を使用してプロパティを参照します。
ただし、ドキュメントが見つからなかったため、複数のプロパティを継承している可能性があります。
私は方法を発見しました。インストールを 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>