Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>By reading <a href="http://dev.eclipse.org/mhonarc/lists/p2-dev/msg01555.html" rel="nofollow noreferrer">this thread</a> and the <a href="http://wiki.eclipse.org/Equinox/p2/Publisher" rel="nofollow noreferrer">P2 Publisher documentation</a>, it should be in <code>org.eclipse.equinox.launcher_*.jar</code></p> <p>Example of a P2 task (not an ant task here) just for the <code>-jar</code> argument:</p> <pre><code>java -jar &lt;targetProductFolder&gt;/plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -metadataRepository file:/&lt;some location&gt;/repository -artifactRepository file:/&lt;some location&gt;/repository -source /&lt;location with a site.xml&gt; -configs gtk.linux.x86 -compress -publishArtifacts </code></pre> <p>The <a href="http://wiki.eclipse.org/Equinox/p2/Ant_Tasks" rel="nofollow noreferrer">P2 Ant tasks are described here</a>, and in the <a href="http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm" rel="nofollow noreferrer">Eclipse help</a>.</p> <hr> <p>The OP <a href="https://stackoverflow.com/users/24069/anthony43">Anthony43</a> adds in the comments:</p> <blockquote> <p>I just want to run an an ant target with p2 taskdefs, outside of eclipse.<br> I found out that I should use <code>antRunner</code>, using such a command line : </p> </blockquote> <pre><code>./eclipse -vm /opt/sun-java2-6.0/bin/java -nosplash \ -data ${java.io.tmpdir}/workspace -consolelog \ -application org.eclipse.ant.core.antRunner \ -f /path/to/scripts/partialMirrorFromRepo.xml </code></pre> <p>But <a href="https://stackoverflow.com/users/84728/andrew-niefer">Andrew Niefer</a> (Eclipse committer on PDE/Build, p2, &amp; Equinox Framework) adds:</p> <blockquote> <p>The <strong>p2 tasks need to be run inside an osgi environment and won't work in a normal ant run</strong>.<br> That is why you need to use the <code>org.eclipse.ant.core.antRunner</code> application.<br> Starting with "java -jar launcher.jar" is just an alternate method to invoking the eclipse executable.</p> </blockquote> <hr> <p><a href="https://stackoverflow.com/users/203797/martin-jakubik">martin jakubik</a> mentions:</p> <blockquote> <p>I would have liked to see a command that I could cut&amp;paste and that put everything together.<br> What I used was:</p> </blockquote> <pre><code>java -jar &lt;eclipse-install-directory&gt;\eclipse\plugins\org.eclipse.equinox.launcher_*.jar -application org.eclipse.ant.core.antRunner. </code></pre> <blockquote> <p>Note that I could not figure out what <code>&lt;targetProductFolder&gt;</code> was, so I used <code>&lt;eclipse-install...&gt;</code> instead.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload