Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is the fragment from my automated eclipse installer written in ant.</p> <p>This installs all features from the custom update site. The code is 'as is', but I sure would have liked to have something like this to guide me when I wrote it.</p> <p>This script also uses <a href="http://ant-contrib.sourceforge.net/" rel="nofollow">antcontrib</a> extension to ant. Antcontrib tasks are have 'ac:' namespace prefix</p> <p>Hope this helps.</p> <pre><code> &lt;property name="real.eclipse.home" location="${eclipse.home}/eclipse"/&gt; &lt;property file="${real.eclipse.home}/configuration/config.ini" prefix="ECLIPSE_CONFIG"/&gt; &lt;property name="eclipse-plugins.dir" location="${real.eclipse.home}/plugins"/&gt; &lt;path id="newest.equinox.launcher-library.path.id"&gt; &lt;dirset dir="${eclipse-plugins.dir}"&gt; &lt;include name="org.eclipse.equinox.launcher.*"/&gt; &lt;/dirset&gt; &lt;/path&gt; &lt;property name="equinox.launcher-library.full-path" refid="newest.equinox.launcher-library.path.id"/&gt; &lt;basename property="equinox.launcher-library.dir" file="${equinox.launcher-library.full-path}"/&gt; &lt;echo message="equinox.launcher-library.dir='${equinox.launcher-library.dir}'"/&gt; &lt;path id="newest.equinox.launcher.path.id"&gt; &lt;fileset dir="${eclipse-plugins.dir}"&gt; &lt;include name="org.eclipse.equinox.launcher_*.jar"/&gt; &lt;/fileset&gt; &lt;/path&gt; &lt;property name="equinox.launcher.jar" refid="newest.equinox.launcher.path.id"/&gt; &lt;basename property="equinox.launcher.jar.basename" file="${equinox.launcher.jar}"/&gt; &lt;echo message="equinox.launcher.jar='${equinox.launcher.jar}'"/&gt; &lt;java jar="${equinox.launcher.jar}" fork="true" failonerror="true" &gt; &lt;arg value="-consolelog"/&gt; &lt;arg value="-application"/&gt; &lt;arg value="org.eclipse.equinox.p2.director"/&gt; &lt;arg value="-repository"/&gt; &lt;arg value="http://${repository.server}/custom-update-site"/&gt; &lt;arg value="-list"/&gt; &lt;redirector logError="true" outputproperty="features.list" &gt; &lt;outputfilterchain&gt; &lt;linecontains&gt; &lt;contains value="feature.group="/&gt; &lt;/linecontains&gt; &lt;replaceregex pattern="(.*feature\.group)=.*$" replace="\1"/&gt; &lt;/outputfilterchain&gt; &lt;/redirector&gt; &lt;/java&gt; &lt;ac:for list="${features.list}" delimiter="${line.separator}" trim="true" param="feature"&gt; &lt;sequential&gt; &lt;ac:if&gt; &lt;isset property="feature.comma.list"/&gt; &lt;then&gt; &lt;ac:var name="feature.comma.list" value="${feature.comma.list},@{feature}"/&gt; &lt;/then&gt; &lt;else&gt; &lt;property name="feature.comma.list" value="@{feature}"/&gt; &lt;/else&gt; &lt;/ac:if&gt; &lt;/sequential&gt; &lt;/ac:for&gt; &lt;echo message="Found following features to install"/&gt; &lt;echo message="${features.list}"/&gt; &lt;java jar="${equinox.launcher.jar}" fork="true" failonerror="true" &gt; &lt;arg value="-consolelog"/&gt; &lt;arg value="-application"/&gt; &lt;arg value="org.eclipse.equinox.p2.director"/&gt; &lt;arg value="-repository"/&gt; &lt;arg value="http://${repository.server}/custom-update-site"/&gt; &lt;arg value="-destination"/&gt; &lt;arg file="${real.eclipse.home}"/&gt; &lt;arg value="-installIU"/&gt; &lt;arg value="${feature.comma.list}"/&gt; &lt;arg value="-profile"/&gt; &lt;arg value="${ECLIPSE_CONFIG.eclipse.p2.profile}"/&gt; &lt;/java&gt; </code></pre> <p>P.S. For its usefulness and complexity Eclipse P2 is surely one of the most underdocumented features.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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