Building an Eclipse Plugin with Maven ?
Apache Maven is great for building java application, it is especially good at dealing at project dependencies and the way they are used and packaged with a project. In the world of the Java applications there is also the guys who play it differently. OSGI based applications don’t deal with dependencies like any other “classical” java projects. For instance when you have a dependency in OSGI you can’t access all the classes of this dependency but only those for which the package has been exposed… This difference between classical and osgi app make difficult building an Eclipse RCP application 100% with maven. More exactly it was so easy to build it with their specific generated ant script, that it was rarely worth it.
This lengthy article at Eclipse Corner, is describing in great details how to build/test an Eclipse plugin with maven. It covers in depth how maven2 works, how eclipse works and what to do to make them work together effectively.
I’ve yet to try their solution which is almost solely based on custom plugins they have written to perform this specific task. I know that the maven team is also working towards supporting OSGI’s way of handling dependencies out of the box. There is also a plugin at codehaus which handles building Eclipse application from maven 2.
Links :

