Category Archives: Uncategorized

Targetdefinition

If you have multiple projects with Tycho and separate targetdefinitions for these, Eclipse and the headless buildsystem will give errors, that the features from your automatically published updatesites are not found. For now, I found the possibility to set the version manually in the targetdefinition to ‘0.0.0’, so the system won’t complain. The newest version is taken.

Eclipse p2 Site Mirroring

It’s often discussed and not really new. Here is the official page http://wiki.eclipse.org/Equinox/p2/Ant_Tasks

If you mirrror a complete repo with f.e. this ant file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="test1" name="3rdparty-mirror">
	<property environment="env" />
	<property name="repo.dir" value="/srv/source/ci/3rdparty-mirror" />

	<macrodef name="runinmirror">
		<attribute name="repopath" default="NOT SET" />
		<sequential>
			<echo message="Mirroring: @{repopath}: Begin" />
			<p2.mirror source="http://@{repopath}/" destination="${repo.dir}/@{repopath}/" />
			<echo message="Mirroring: @{repopath}: End" />
		</sequential>
	</macrodef>

	<target name="test1">
		<echo message="Repo: ${repo.dir}" />
		<runinmirror repopath="subclipse.tigris.org/update_1.6.x" />
		<runinmirror repopath="subclipse.tigris.org/update_1.8.x" />
		<runinmirror repopath="download.eclipse.org/releases/indigo" />
		<runinmirror repopath="download.eclipse.org/eclipse/updates/3.7" />
		<runinmirror repopath="download.eclipse.org/tools/orbit/downloads/drops/R20130118183705/repository" />
		<!-- 
		<runinmirror repopath="download.eclipse.org/releases/juno" />
		<runinmirror repopath="download.eclipse.org/eclipse/updates/4.2" />
		 -->
	</target>

</project>

You can execute the file with the following scriptfile. After it is done, there is a repository with all its contents and the categories.

But if you do a selective mirror with this ant file:

<iu id="org.eclipse.equinox.sdk.feature.group"/>

You loose the categories.
After the mirroring is done, you can configure the repositories categories with the script:

java -jar ${ECLIPSE_LAUNCHER} -application org.eclipse.equinox.p2.publisher.CategoryPublisher -nosplash -verbose -data ${WORKSPACE} -metadataRepository ${REPO_DIR} -categoryDefinition ${CATEGORY_FILE}

Perhaps there is another solution for the partial mirrroring?

b3aggr: http://wiki.eclipse.org/Eclipse_b3/aggregator/manual

Continuous integration

Here is a really good tutorial for continuous integration with Tycho and Hudson: http://codeandme.blogspot.de/2012/12/tycho-build-1-building-plug-ins.html

For eclipse features the most important point is that with the current version 0.16 a magic folder is needed, else the features are not build. With the current 0.17.0-SNAPSHOT version this issue is fixed.