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.

About these ads

10 Responses to “Create your own Eclipse distro made easy”

  1. I also have smaill program to build my eclipse distro whenever I need a new one

    https://jee5sample.googlecode.com/svn/trunk/eclipsedropinsbuilder/

    It is not for end user, I just often run it directly from my eclipse IDE.

  2. I have a quite similar solution in bash: https://github.com/ferstl/eclipse-builder
    But instead of customizing the script for different distros, there are simple configuration files that look very similar to the parameters in your ANT target.

  3. Is it possbile to build an all platform distribution with Windows, Mac OSx, linux… naitve aunchers in the same distribution ?

    • An interesting question, I’ve never thought about that. The problem is most likely that the native launcher searches for the config.ini in a special location which is not different between the different installs (at least Linux and Win have the same structure).

  4. Hi Tom,

    thank you for sharing the distro builder ant task! I’ve got a suggestion for small improvement for you. It would be nice to have a script parameter “appDefinition” passed to

    at.bestsolution.releng.distrobuilder.DistroBuilder#buildDistro(File, String, String, String)

    so not everyones distro get labeled “efx” :-)

    Regards,
    Alex

Trackbacks/Pingbacks

  1. e(fx)clipse 0.1.0 released | Tomsondev Blog - July 20, 2012

    [...] make the creation of eclipse distributions a no brainer for none bash gurus like me, I’ve published a small library which can be used inside ant or java. Share [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 708 other followers

%d bloggers like this: