2012-04-14 16 views

答えて

1

バニラアリがant.jarをにプレーンプロパティファイル経由で定義されたそのtaskdefsを持っているとして、あなたが使用することができます:

<project> 
<property url="jar:file:/path/to/your/ANT_HOME/ant.jar!/org/apache/tools/ant/taskdefs/defaults.properties" prefix="antcoretasks"/> 
<echoproperties prefix="antcoretasks"/> 
</project> 

をアリコアタスクを一覧表示するには、出力:

[echoproperties] #Ant properties 
[echoproperties] #Sat Apr 14 21:23:41 CEST 2012 
[echoproperties] antcoretasks.ant=org.apache.tools.ant.taskdefs.Ant 
[echoproperties] antcoretasks.antcall=org.apache.tools.ant.taskdefs.CallTarget 
[echoproperties] antcoretasks.antlr=org.apache.tools.ant.taskdefs.optional.ANTLR 
[echoproperties] antcoretasks.antstructure=org.apache.tools.ant.taskdefs.AntStructure 
[echoproperties] antcoretasks.antversion=org.apache.tools.ant.taskdefs.condition.AntVersion 
... etc. 

かファイルに書き込みます。

<echoproperties prefix="antcoretasks" destfile="some.file"/> 

これ以上の要件がある場合は、質問に詳細を記入する必要があります。

+0

お返事ありがとうございます。 – user1333579

+0

でもGroovy - AntBuilder()。antProject.taskDefinitionsを使用することができますが、私はあなたの提案がより好きです。おかげで – user1333579

+0

は分かりませんでした。そのGroovyはあなたのためのオプションです。私はGroovyが好きで、非常に頻繁にそれをAntの内側と外側に使います。 – Rebse

関連する問題