Question

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

Was it helpful?

Solution

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

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top