My take on Maven/p2 unification at Eclipse
A big part of the common build infrastructure (CBI) initiative at Eclipse is making things easier. Making it a lot easier to find and include software components into a project’s build will have a significant positive effect for projects both in and beyond the Eclipse Ecosystem. More automation will help those building Eclipse to be more efficient which is also a very good thing.
While there are a few formats and server technologies available for distributing build artifacts, there is no single technology to satisfy all needs. For plugins/features, p2/bundles is absolutely required and will be for the foreseeable future for Eclipse. It is the defacto way software is managed in Eclipse.
When considering the the wider ecosystem, storing/indexing/distributing maven repositories is highly desirable given it is the clear leader in the Java Ecosystem. For logistical reasons, from a project consumed beyond Eclipse, there’s a good argument maven support is absolutely required.
Thus we arrive at a simple conclusion: need to support creation, storage, indexing, and distribution of both p2 and maven repositories. This presents a problem that has been much discussed in bugzilla and on mailing lists in the Eclipse community… how do you unify two different repository formats with incompatible numbering schemes.
Here’s what I propose: we don’t. Yep, that’s right. Do nothing.
Instead, we facilitate/nurture/support generation of p2 *and* maven repositories. Each are optional from a given project’s perspective… do one, the other, or both. It’s your choice.
The massive amount of software that is common to Linux distributions using different incompatible packaging is a good template to look at. So long as each package can map back to the code that generated it, there’s no need for a magic decoder ring to convert .rpm versions in Fedora to .deb versions in Ubuntu. Same thing here… so what I propose is making it very easy to to figure out which git repository/ commit/ tag was used to generate an artifact contained within a maven or p2 repository built at Eclipse. If we have that, then generating both formats becomes a lot more straight forward. Building tools to make this easy is a lot simpler and more robust than trying to build a magic decoder/converter.
Please let me know if I’ve overlooked something important here?