Skip to content

Instantly share code, notes, and snippets.

@njbartlett
Created October 11, 2012 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njbartlett/3874679 to your computer and use it in GitHub Desktop.
Save njbartlett/3874679 to your computer and use it in GitHub Desktop.
p2 repository in ANT
<!-- Generate the p2 repository and index -->
<target name="p2" depends="build,features.dir,plugins.dir" description="Generate the p2 repository">
<java jar="${workspacedir}/cnf/eclipse-3.5.2/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar" fork="true" failonerror="true">
<!-- <arg line="-consoleLog"/> -->
<arg line="-application org.eclipse.ant.core.antRunner"/>
<arg line="-data ${target}"/>
<arg line="-buildfile build.xml __internal_p2"/>
</java>
<!-- Append the category info -->
<java jar="${workspacedir}/cnf/eclipse-3.5.2/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar" fork="true" failonerror="true">
<!-- <arg line="-consoleLog"/> -->
<arg line="-application org.eclipse.equinox.p2.publisher.CategoryPublisher"/>
<arg line="-data ${target}"/>
<arg line="-metadataRepository file:${target}/p2"/>
<arg line="-categoryDefinition file:${target}/features/category.xml"/>
<arg line="-compress"/>
</java>
<!-- Build the archive -->
<zip file="${target}/bndtools-latest.zip">
<zipfileset dir="${target}/p2" includes="**"/>
</zip>
</target>
<!-- Called internally by the Eclipse embedded ANT application -->
<target name="__internal_p2" depends="init">
<p2.publish.featuresAndBundles
source="${workspacedir}"
repository="file:${target}/p2"
append="false"
repositoryname="Bndtools"
compress="true">
<features dir="${target}/features" includes="*.jar"/>
<bundles dir="${target}/plugins" includes="*.jar"/>
</p2.publish.featuresAndBundles>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment