0
実行時に利用可能なAntタスクのリストを取得する必要があります。基本的には、ユーザークラスのパスに含まれるantライブラリを使用し、すべてのantタスクを一覧表示します。ANT - Javaを使用してAntライブラリから利用可能なタスクのリストを取得するには
実行時に利用可能なAntタスクのリストを取得する必要があります。基本的には、ユーザークラスのパスに含まれるantライブラリを使用し、すべてのantタスクを一覧表示します。ANT - Javaを使用してAntライブラリから利用可能なタスクのリストを取得するには
バニラアリが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"/>
これ以上の要件がある場合は、質問に詳細を記入する必要があります。
お返事ありがとうございます。 – user1333579
でもGroovy - AntBuilder()。antProject.taskDefinitionsを使用することができますが、私はあなたの提案がより好きです。おかげで – user1333579
は分かりませんでした。そのGroovyはあなたのためのオプションです。私はGroovyが好きで、非常に頻繁にそれをAntの内側と外側に使います。 – Rebse