Building Eclipse plugins and features on the command line
Asked Answered
D

6

23

I have a bunch of Eclipse plugins and features, which I would like to build as part of a nightly (headless) build. I've managed to do this using a complicated setup involving manually specifying paths to Eclipse plugin jars, copying customTargets.xml, etc.

Is there really no simpler solution? Isn't there a way to just point out my Update Site's site.xml and say "build"; i.e. the equivalent of clicking "Build All" in the Update Site project?

Darg answered 25/9, 2008 at 13:13 Comment(0)
L
8

Given that all the answers to this question are all 3-5 years old, I figure an update would be useful to others.

For those who want to add the building of Eclipse plugins to the CI process, I recommend they check out the Eclipse Tycho project. This is essentially a Maven plugin that allows you you to wrap eclipse projects within Maven project. With this we use Atlassian Bamboo to build our Eclipse plugin. This also allows us to use the Maven jarsigner plugin to sign our plugin files.

Loon answered 19/8, 2013 at 18:35 Comment(1)
Yes, we've migrated to Tycho as well. Tycho seems to have become the preferred choice for building Eclipse plugins. The Eclipse Platform 4.3 (Kepler) release also uses Tycho, as far as I understand.Darg
C
2

I've just been fighting with this problem myself. Are you using the productBuild script? Maybe putting your features into a product would help you out.

I am doing a headless build on a product configuration. The only script that I customized was to add some ant tasks to customTargets.xml to get my sources from SVN and to do a little cleanup on JNLP manifests after the build as I am using WebStart.

Then you only need to invoke antRunner on the out of the box productBuild.xml in the scripts/productBuild directory (in the pde-build plugin).

Contraption answered 25/9, 2008 at 13:23 Comment(2)
No, I'm using the scripts/build.xml. I'm amazed that nobody has made a Eclipse GUI for setting up a headless build, and that I still have to fiddle around with XML-files.Darg
Maybe we have a nice chance to have a new eclipse plugin here.Chap
W
2

Check out Ant4Eclipse. I've used it to parse Eclipse's .classpath/.project files to determine project dependencies and classpaths. In combination with Groovy Ant Task, I have automatically built multiple projects in Ant using the Eclipse project files for build information.

A buildPlugin task exists, but I have not personally used it.

Wacke answered 26/9, 2008 at 4:30 Comment(0)
U
2

We are currently using PDE to automatically build features and our complete product. It works quite well. Make sure you use the right script for product build or feature build. Eclipse Help on using PDE

EDIT: We've now migrated to Buckminster, which has an excellent command line interface.

Uncircumcised answered 5/10, 2008 at 15:17 Comment(1)
With some helping Ruby scripts, we went with the PDE build anyway. Ant4Eclipse was promising but buggy, and since the mailinglist seems to be down, there wasn't much help to be had there.Darg
C
1

You might look into buckminster and maven. There is a learning curve for sure, but they seem to do their jobs well.

Caesalpiniaceous answered 25/9, 2008 at 13:18 Comment(2)
I looked into Maven, but it seemed to have very strict ideas on how projects should be laid out which didn't match with the typical Eclipse layout. I'll look into Buckminster.Darg
Yes, the learning curve is quite steep, but you're likely not to use all of it. Definitely worth it for what it does.Writeoff
H
1

We are using headlesseclipse, which can be found on Google Code:

http://code.google.com/p/headlesseclipse/

It works quite well, and can easily automate command-line building of plugins and features. However, I have not yet found a way to automate building of the update site via the command line.

Heroism answered 23/9, 2010 at 16:41 Comment(1)
HeadlessEclipse is officially dead, as the major contributors have moved to Maven.Darg

© 2022 - 2024 — McMap. All rights reserved.