So the semester is drawing to a close, and it’s time to reflect on the results of our work.

We completed the project we set out to make - a Maven plugin which records version information and Git commit information, and an Eclipse plugin to interact with those records. It’s pretty cool to see tangible results, and hopefully our work will prove useful to people in the future.

The actual product is probably most useful to Eclipse users who are potential Eclipse contributors: it makes it easy for them to get the source code for their installed software, without needing to identify the repository or commit it should be traced back to. With the number and size of Eclipse projects, that task is nearly Herculean, so making it easier for someone to access that code makes it much more likely that they will still have the stamina to actually look at the code and try to understand it.

Obviously this project is not a complete solution to the problem of working with Maven and p2 projects. What it doesn’t do is make it easier for developers to actually integrate p2 and Maven projects.

Currently, the accepted solution for building p2 projects with Maven is Tycho, our favorite plugin.

There are a number of compromises one makes when building with Tycho which make deep integration difficult. First, the Maven artifactId of a project has to match the OSGI bundle identifier exactly, which means that the artifactId is probably something like org.eclipse.cbi.versionchecker (the namespace of our project). This is an issue since idiomatic Maven artifactIds are more like versionchecker-plugin; they are usually hyphen-separated, without the hierarchical group information. Second, Tycho ignores the dependencies specified in the pom.xml, and uses the dependencies specified in the manifest instead. This latter point is the chief problem in integrating Maven-built projects into a p2 project.

Integration the other way is possible. the artifacts which Tycho produces can be submitted to a Maven repository as normal, using a distributionManagement element in the pom.xml, and running the deploy goal. Then, in the dependent Maven-only build, you can specify the groupId and artifactId as you would for any other Maven dependency.

Overall, the semester has been really valuable for me - I learned a lot about some powerful build tools which I had never encountered before. It is always great to be able to spelunk into some new area, and try to learn as much as you can in great detail about a new topic.

If I had some advice for future UCOSP students, it would be this: