问题
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.
回答1:
No there is no such tool. Tycho is also the only approach I know of.
回答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
回答3:
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.
回答4:
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.
回答5:
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.
回答6:
I used Mavenide for a while, it was just ok. Not sure on how it is today though.
回答7:
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.
回答8:
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
来源:https://stackoverflow.com/questions/545531/is-it-currently-possible-to-build-eclipse-plugins-by-maven-and-have-nice-ide-int