Hi,

My company has been using Maven 1 for a couple of years now and we are
looking to make the transition over to the Maven 2 world (waiting for the
best opportunity)!  The UI for most of our applications are RCP based.  The
build process for the UI is using the PDE and is completely autonomous from
our middle tier build with Maven.  We are hoping that with the transition to
Maven 2 there would be some new functionality to allow for RCP/OSGi
development.  Unfortunately we have found that we may not have waited long
enough!  There have been several options that we have looked at to obtain
bridge Maven and our Eclipse Development:

   - *Building Eclipse Plugins with Maven 2 (
   
http://www.eclipse.org/articles/article.php?file=Article-Eclipse-and-Maven2/index.html
   )*  In this articles the authors describe in detail how they integrated
   Maven2 and Eclipse.  One aspect of their approach that I did like was how
   they made use of the manifest file to define the dependencies for the
   project (similar to how Eclipse works); however they need to use the
   'Required-Bundle' tags rather than the improved 'Import-Packages'.  Though
   well documented this approach wasn't favoured as it did not offer the Mojos
   re-built in a repo (they just offer the code for the Mojos but they don't
   make their Mojos available) and the article was written in 2006.  The
   company, Princeton software, was bought by IBM so it is hard to get a hold
   of the developers for the project.
   - *CodeHaus Maven PDE plugin (http://mojo.codehaus.org/pde-maven-plugin)*
   This Mojo triggers the PDE build from Maven.  Though this approach would be
   fairly straight forward in that the regular PDE mechanism can be used for
   building the RCP application there are several drawbacks we see related to
   the build occuring in 2 seperate build technologies:
   PDE doesn't offer any way to easily integrate Maven 2 report tooling into
   its build process (checkstyle, code coverage, ect.)
   PDE is another technology for our developers to learn (more Ant based
   build cycle)
   - *Felix Bundle Plugin for Maven (
   http://felix.apache.org/site/mavem-bundle-plugin-bnd.html)* This Mojo is
   based on the BND tooling.  In this approach all the dependencies are
   specified in the POM and manifest is generated during the package lifecycle
   in Maven.  There are specific commands to provide the 'Export-Package',
   'Private-Package', etc.  However the BND tooling will analyze the byte code
   to determine some information such as the 'Import-Packages'.  Though this
   tooling works well for generating OSGi bundles it does not leverage the
   tooling available in Eclipse.  Once you have your plugin working with its
   dependencies in Eclipse you then need to rework your POM to ensure that the
   manifest that is generated is equivalent to that which you now have in
   Eclipse.  This is not always a trivial process.  Given that limitation this
   is the process that is favoured at the moment.  Some pros about this
   methodology:
   + What is nice about this approach is that everything is done in Maven
   allowing you to now hook all the Maven reporting plugins.
   + Leverage Maven 2 Repo for your dependent bundles (note that your
   bundles cannot be of the format of a jar within the bundle - they have to be
   more like regular jars to be used by Maven)
   + Generate target platform in Maven

However after reading the article 'Jason Van Zyl Discusses Sonatype, The
Eclipse Foundation and Maven' (
http://www.infoq.com/news/2008/08/van-zyl-eclipse-sonatype-maven) we believe
that Tycho seems to be the up and coming solution to bridging the world of
OSGi and Maven.  So I have done some research into Tycho and have some
questions:

   - At the beginning of the Tycho development it was a set of plugins to
   provide building with the PDE compiler (as it understands the whole OSGi
   dependency/class loading issues), 'osgi-bundle' lifecycle, generation of
   POM, etc.  Now it seems to have morphed into Maven 2.1?  Is Tycho and
   M2Eclipse the basis of the development for Maven 2.1?
   - Will the new version be able to do everything with the manifest that
   Maven 2.0 does with the POM?  Through the manifest be able to tell what
   dependencies are required?  What if those dependencies are only through
   Import-Packages (with a version to make life easier)?  Will the integration
   with the p2 enable M2Eclipse to determine which bundles supply a given
   package and add the required dependencie between the projects?
   - Will the p2 integration be on top of the existing Maven repo or a
   seperate repo to get bundles from?
   - What is the timeline/gameplan for Tycho development at this point?

So as you can see we are really just starting out down this path.  We would
be willing to help with development if we find an area that we can
contribute effectively into the project.  However as of right now we just
want a starting point to start getting our projects configured to using
Tycho.  Could you point us in the right direction?  The ReadMe file in the
release now is the one for the Apache Maven, so it doesn't really help with
the configuration of a project using Tycho.  Is it the same configuration as
before?  Should we be using a different version (previous version than
0.3.0)?

Thanks,  Any help you can give would be appreciated!
Alex

Reply via email to