15

I'm currently evaluating maven to improve our build process. The building and creating of normal jar files works so far, although I'm not entirely happy with the Maven IDE.

I'm now at that point, where all libs I need for our project are built, and I'm moving on to the Eclipse RCP projects. And now I'm not sure how to go on.

There are some plugins I need to build first, before moving on to the actual RCP part. Therefore I have actually 3 problems.

I want to build those plugins, the only real solution for that seems to be the maven-bundle-plugin: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

But, For nice IDE integration I also need the appropriate files (plugin.xml, build.properties, etc ...) which should be generated automatically.

For building the RCP parts, it seems so far the only solution is only the pde-maven-plugin http://mojo.codehaus.org/pde-maven-plugin/ which, as far as I can tell, uses ant-pde. This is stupid, isn't it?

The only other thing I could found was tycho (http://www.sonatype.com/people/2008/11/building-eclipse-plugins-with-maven-tycho/) , but this is till in a very early stage.

and again, a nice Eclipse integration is necessary. I really, really, really don't want to specify dependencies twice.

So How do you build your Eclipse RCP projects with maven?

Update

For now, it seems that there is no such solution available. Tycho looks very promising, but I wasted 2 days and didn't get it to run (the current version at this point). Maybe it will be ready in half a year or so.

Mauli
  • 16,863
  • 27
  • 87
  • 114
  • Since PDE is based on ANT buildfiles, I don't see how the pde-maven-plugin is stupid. Don't reinvent the wheel. – Aaron Digulla Feb 13 '09 at 13:07
  • But maven already does most of the things on its own (compiling, packaging, etc ...), so why not have a completely independent (from ant) plugin with minimal configuration overhead? – Mauli Feb 13 '09 at 15:24
  • I am currently have a look at Tycho vs. Buckminster etc. Over one year after your question, how are your experience? – cuh Jul 12 '11 at 14:42

8 Answers8

7

No there is no such tool. Tycho is also the only approach I know of.

Philip Helger
  • 1,814
  • 18
  • 28
2

I use m2eclipse and it fits well my needs. You specify your dependencies in the pom.xml and they are automatically taken into account in Eclipse's build path.

Caveat: I cannot tell anything about RCP (never built anything for that platform).

Best regards,

Cyril

cadrian
  • 7,332
  • 2
  • 33
  • 42
2

Are you dead set on using maven to build your RCP apps? I ask this because, from my experience using maven to build anything more than trivial RCP apps can be quite a pain. When I started working on RCP applications I initially investigated using maven as a build solution, but found out that the support for eclipse builds within maven was very basic at the time. Also, some co-workers of mine are using maven for another RCP based project in our company, and while the support for eclipse has gotten better, they had to jump through some hoops to get it to work to their liking. So, my opinion is that for now, stick to using the ant based pde build for your RCP applications.

nstehr
  • 7,978
  • 2
  • 18
  • 22
1

Nowadays Tycho allows resolving dependencies based on the built bundles' manifests (required bundles, imported packages, etc.).

Moreover, Tycho can be configured to use a target platform for the build. This allows using the same target platform for maven and pde builds.

Since v0.24.0, Tycho can even build POM-less plug-ins and features, avoiding the duplication of version and artifactId metadata.

In light of the above, and considering that even the Eclipse Platform is built using it for a few years now, Maven Tycho is currently the best way to build an RCP headlessly.

tkotisis
  • 3,442
  • 25
  • 30
0

Tycho does what you need. Now in 2012, it is mature and usable set of maven plugins. I can only recommend it.

The quality of the documentation has obviously not changed very much since 2009. It may be difficult to get Tycho running. We managed to understand Tycho and we've been successfully using it for building a considerably large Eclipse RCP application for more than a year and a half. We adopted a manifest-first approach, where all the plugin(project) dependencies are defined in MANIFEST.MF. The final product of our build is an executable application and also a p2 site for easy updates. All done by maven build.

gargii
  • 1,010
  • 8
  • 16
  • Hi, does tycho build an independent maven project (as using an archetype), as does netBeans RCP application get builded or it's smth more complicated that it's stuck to the Eclipse IDE. Because what I see here seems more complicated http://wiki.eclipse.org/Developing_Tycho. – Bax Sep 24 '12 at 10:57
0

If u r building an Eclipse Plugin or application (RCP) Maven Tycho is the recommended way to build it.

It's pretty intelligent in resolving osgi dependencies. U can refer to my tutorials on Maven Tycho Tutorials

Maven Tycho requires m2eclipse and Tycho configurator installation.

And archetype should be eclipse-plugin or eclipse-feature or eclipse-repository

Malai
  • 31
  • 1
  • 5
0

In our project we have separated the target platform and the application plugins. In short: we build the target platform with Maven, while the application plugins are built with PDE.

Sergey Borodavkin
  • 285
  • 1
  • 3
  • 7
0

I used Mavenide for a while, it was just ok. Not sure on how it is today though.

Decio Lira
  • 1,821
  • 1
  • 18
  • 24