问题描述
我阅读了SO的帖子,这是一个很大的帮助。我试图调用p2.process.artifacts,但我不知道我应该传递什么参数到java任务调用。应用程序参数的值应该是什么,如何将扩展名(p2.process.arifacts:sign)传递给这个嵌套在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来运行蚂蚁包含任务的脚本(例如,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将是这样的: / p>
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>
这篇关于在Jenkins中运行p2.process.artifacts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!