【问题标题】:Running p2.process.artifacts in Jenkins在 Jenkins 中运行 p2.process.artifacts
【发布时间】:2012-09-01 21:45:23
【问题描述】:
我阅读了 SO 帖子 Running P2 Ant tasks outside Eclipse,这对我很有帮助。我正在尝试调用 p2.process.artifacts,但是我不确定应该将哪些参数传递给 java 任务调用。应用程序参数的值应该是什么?如何将增强 jar 签名 (p2.process.arifacts:sign) 传递给嵌套在 p2.process.artifacts 元素中的这个调用?
谢谢,
亚历克斯
【问题讨论】:
标签:
eclipse
ant
equinox
eclipse-pde
p2
【解决方案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>