问题描述
我读了SO发布,这是一个很大的帮助。我想打电话给p2.process.artifacts,但是我不知道我应该传递给java任务叫什么参数。我应该为应用程序的参数值,我怎么能传递增加了JAR签名(p2.process.arifacts:符号)?这一呼吁是嵌套在p2.process.artifacts元素
I read the SO post Running P2 Ant tasks outside Eclipse, which was a great help. I am trying to call p2.process.artifacts, however I am not sure what arguments should I pass to java task call. What should value for application argument be and how can I pass augment for jar signing (p2.process.arifacts:sign) to this call which is nested in p2.process.artifacts element?
谢谢,
亚历克斯
Thanks,Alex
推荐答案
如果你想使用Java调用Eclipse的AntRunner运行Ant脚本运行的(例如,build.xml文件),其中包含的任务,你可以像这样做
If you want to run with Java calling Eclipse's AntRunner to run an ant script (eg., build.xml) containing the task, you could do it like this:
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文件会是这样的:
Then build.xml would be something like:
<project default="pack">
<target name="pack">
<property name="workDir" value="${basedir}/somerepofolder/"/>
<p2.process.artifacts pack="true" repositoryPath="file:${workDir}" />
</target>
</project>
这篇关于在詹金斯运行p2.process.artifacts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!