views:

1592

answers:

7

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?

+1  A: 

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

Steve g
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.
JesperE
Yes, the learning curve is quite steep, but you're likely not to use all of it. Definitely worth it for what it does.
jamesh
+1  A: 

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).

Revah
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.
JesperE
Maybe we have a nice chance to have a new eclipse plugin here.
Mario Ortegón
A: 

Rest assured that if someone does write a nice plugin to automate this, the documentation will be so thin that only 5 of his friends will be able to use it... :)

Revah
yep. Someone already did. And it's called Buckminster. Any sufficiently complicated tool needs pretty detailed docs, and the code is much more interesting to write, so the docs do get left behind.
jamesh
+1  A: 

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.

flicken
A: 

We're currently struggling with the same problem. Perhaps this article: http://www.eclipse.org/articles/Article-PDE-Automation/automation.html will help you ?

+1  A: 

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.

ILikeCoffee
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.
JesperE
A: 

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.

walk_n_wind