Thursday 24 April 2008

Eclipse and Maven - a quick update

I have not posted anything about the progress of my researches into Eclipse and Maven integration for a while. That's because for a long time, we didn't get significantly further along in our research. But just recently we've started making significant progress again.

A very important lesson was that the pde-maven-plugin is really not worth persevering with - at least in our situation. We decided that we wanted to build every Eclipse plug-in and every Eclipse feature using its own POM, so that we could for example generate code coverage reports for each component individually and also configuration-manage them at that level of granularity. It turned out to be not all that difficult to invoke the PDE headless build for these circumstances from Maven using about two dozen lines of Ant script.

After nine months of Eclipse 3.3, the pde-maven-plugin has still not been officially updated to handle the changes from Eclipse 3.2 (we had to use the Alpha 2 snapshot version downloaded from Codehaus) and so we're concerned that we might have similar upward compatibility problems when Eclipse 3.4 comes out in a few months.

When it's all been finalised, I hope to publish a longer explanation of how our build system works here. Don't hold your breath though; at the moment we still have to solve a few issues - for example, we need to figure out how to produce the source plug-ins alongside the executable ones.

7 comments:

breskeby said...

Hi immo, greez from germany. nice to hear that you make progress in the build process of rcp with maven. the last days i visited the jax java conference where all was about osgi. do you also work on non rcp applications which are based on osgi. we are trying to change our server components to osgi. to get an easy solution for building up an out of the box running server application i'm wondering if the product feature of eclipse rcp could be used here. any ideas about it? i think it is not actually supported for simply osgi apps.

good luck with your next maven, eclipse, build up researches.

Jason Nerothin said...

I'm in the midst of attempting to migrate an RCP project to maven one module at a time. I think the biggest gotchya is that you probably shouldn't waste your time trying to use Eclipse to "do maven" (which is almost as mind-bending as using Eclipse to "write an Eclipse"). Just use the CLI. Makes life a ton easier.

Luc Trudeau said...

I'm having the same problem! I'm trying to convert an eclipse plug-in from ant to maven and the documentation available on the web is not so great and don't get me started on the plug-ins...

Jason Nerothin said...

So, a couple of days further into it, I came this much further: A. Use maven version 2.0.9., which lacks a critical "bug" that can't differentiate between natural order versioning (maven) and Eclipse versioning (calendar based). B. Explicitly define each and every RCP plugin version number in an inherited "parent pom". (Only those required by your project, where "required" is inferred from error output of `mvn clean compile` in the relevant sub-project.) C. Debug on the CLI. Use anything Eclipse as a last resort.

Unknown said...

@bioinfogu: could you elaborate on your idea, please? I'm trying to use it in practice but without any result. As far as I looked into 2.0.9 release I haven't found any closed bugs which would address this problem.

Dan said...

Hi Immo,

Would you be able to publish those couple of dozen lines of Ant to drive PDE from Maven ... suitably anonomized? Would be a useful headstart?

Cheers
Dan

Maralc said...

Hi Immo,
Thank you for the very good material at the blog.
Do you already have a solution to build eclipse 3.4 with Maven?
Thanks in advance.

Marcelo