After some time trying to figure out what the best conversion from Eclipse plugins / OSGi bundles naming conventions to Maven naming I had finally put many Eclipse plugins in the central Maven repository (see only the Eclipse plugins that got copied in this batch). It’s sometimes a bit tricky, but the main goal was a bidirectional automated translation from Bundle-SymbolicName and Bundle-Version to groupId, artifactId and version in Maven.
Basically you take the BundleId and use the dots to split it. The last section is the artifactId, the rest is the groupId. For the versions they are pretty much the same, only changing dashes and underscores. There’s a maven-osgi library very light that you can use to do these conversions, used by the Maven Eclipse and Felix bundle plugins.
This improves the support for building Eclipse plugins from Maven, although you can do some things already, or using Eclipse libraries from Maven projects. We’ll see more activity in these two fields soon.
Some people complained that you get weird jar names like net-1.0.0-I20070531.jar. Something I’d like to point out is that the repository is just an interface, the way artifacts are stored internally shouldn’t matter to the clients (Maven, Ivy,…). Plugins that generate a flat directory with jars (like assembly, war,…) should take care of renaming the jars to groupId.artifactId, to avoid clashes in the namespace, and so you get a meaningful name out of a hierarchical directory structure.