0

SO の投稿Running P2 Ant tasks outside Eclipseを読みました。これは大きな助けになりました。p2.process.artifacts を呼び出そうとしていますが、Java タスク呼び出しにどの引数を渡す必要があるかわかりません。アプリケーション引数の値は何であるべきですか? また、p2.process.artifacts 要素にネストされているこの呼び出しに jar 署名 (p2.process.arifacts:sign) の拡張を渡すにはどうすればよいですか?

ありがとう、アレックス

4

1 に答える 1

1

Java で Eclipse の AntRunner を呼び出してタスクを含む ant スクリプト (例: build.xml) を実行する場合は、次のように実行できます。

  java -cp /path/to/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
      org.eclipse.equinox.launcher.Main -consoleLog -nosplash -data /tmp \
      -application org.eclipse.ant.core.antRunner -f build.xml

次に、build.xml は次のようになります。

<project default="pack">
  <target name="pack">
    <property name="workDir" value="${basedir}/somerepofolder/"/>
    <p2.process.artifacts pack="true" repositoryPath="file:${workDir}" />
  </target>
</project>
于 2013-04-27T18:40:10.440 に答える