Blog

Create your own Eclipse distro made easy

To foster adoption of your tool it might make sense to provide all-in-one downloads. This makes sense if your product has dependencies on many different 3rd party plugins (and you e.g. need very specific versions) or you want to make it super easy for your users to start using your tool. Since e(fx)clipse provides such downloads to its users many people who are not yet familiar with eclipse and want to give it a shot use the distros we are providing. Until today those distros have been created through a shell script provided by Denis Hübner from itemis but because I'm not an bash guru, customizing it to my needs was a bit painful and so I decided to write my own very very simple distro builder using Java. Our CI-Server now generates distros using this ant-file

<project>
	<property name="efx.version" />
	
	<taskdef name="builder" 
		classpath="/home/jenkins/distbuilder/libs/at.bestsolution.releng.distrobuilder-0.0.1-SNAPSHOT.jar"
		classname="at.bestsolution.releng.distrobuilder.ant.DistroBuilderTaskDef" />
	<target name="build-distros" description="Build distros">
		<echo>Hello World</echo>
		<builder
			builddirectory="/tmp/efx-build"
			p2directorexecutable="/home/jenkins/distbuilder/builder/eclipse"
			targetdirectory="/home/jenkins/distbuilder/targets"
			staticreposdirectory="/home/jenkins/distbuilder/repos"
			distdirectory="/tmp/efx-jbuild/dist"
			version="${efx.version}">
			
			<updatesite url="http://cbes.javaforge.com/update" os="win32"/>
			
			<p2repository url="http://www.efxclipse.org/p2-repos/releases/at.bestsolution.efxclipse.tooling.updatesite-${efx.version}.zip"/>

			<installunit name="org.eclipse.emf.sdk.feature.group"/>
			<installunit name="org.eclipse.xtext.sdk.feature.group"/>
			<installunit name="org.eclipse.emf.mwe2.runtime.sdk.feature.group"/>
			<installunit name="at.bestsolution.efxclipse.tooling.feature.feature.group"/>
			<installunit name="at.bestsolution.efxclipse.runtime.e3.feature.feature.group"/>
			<installunit name="org.eclipse.wst.xml_ui.feature.feature.group"/>
			<installunit name="org.eclipse.egit.feature.group"/>
			<installunit name="org.tigris.subversion.clientadapter.feature.feature.group"/>
			<installunit name="org.tigris.subversion.subclipse.feature.group"/>
			<installunit name="org.tigris.subversion.clientadapter.svnkit.feature.feature.group"/>
			<installunit name="org.eclipse.e4.core.tools.feature.feature.group" />
			<installunit name="org.tigris.subversion.clientadapter.javahl.feature.feature.group" os="win32" arch="x86" />
			<installunit name="mercurialeclipse.feature.group" os="win32" />
			<installunit name="com.intland.hgbinary.win32.feature.group" os="win32" />			
		</builder>
	</target>
	
</project>

Building the distro / platform takes around 30 Seconds. Currently we are building 3.7.2, 3.8.0 and 4.2.0 for linux (x86,x86_64), mac-cocoa (x86_64), win32 (x86,x86_64). I've shared the small utility on https://github.com/tomsontom/distrobuilder. I hope you find this small utility useful.

published on
Previous
Interview on fxexperience.com