私はwebstart jnlpファイルを作成するこのantタスクを持っています。複数のjarファイル名を持つant replacetoken
これは、テンプレートファイルから@タイトル@などのようなトークンを置き換える: あるlog4j.jar、xpp.jar、資源:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="@[email protected]">
<information>
<title>@[email protected]</title>
</information>
<resources>
@[email protected]
</resources>
<application-desc main-class="@[email protected]"/>
</jnlp>
問題は、私は私のlib /ディレクトリには多くの瓶を持っていることです。 jar ... と1 jarsトークン。
@ jars @トークンをjarsファイル名に置き換えるにはどうすればよいですか?あなたが@jarsを交換しようとしている
<target name="webstart" description="Deploy as jnlp webstart">
<copy file="template.jnlp" tofile="test.jnlp">
<filterchain>
<replacetokens>
<token key="codebase" value="myCodebase" />
<token key="title" value="myTitle" />
<token key="jars" value="jar href="xxx.jar" />
</replacetokens>
</filterchain>
</copy>
</target>
<project/>
、私は彼が解析されるプロパティのコンテンツを必要だと思いますファイルセットに応じて動的に変更します。 – oers
はい、動的に、ここでパスコンバートが見つかりました[リンク](http://stackoverflow.com/questions/1978866/is-it-possible-to-replace-text-in-properties-in-ants-build-xml) と= "$のlib.dir" から= "0のhref = "" filtermapper> にreplacestring so: <似の" –
Stefan