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.
great! but personally I think artifactId should be the same as Bundle-SymbolicName — I think it’s just better if the jars are not too ambigously named. groupId can still be the part of the artifactId minus the part after the last dot.
Does this mean I can finally deprecate the *cough, cough* “undocumented feature” that is the EMF Maven2 site ?
I notice you have EMF 2.1.0 and 2.3.0 in your staging site , but nothing in between or since. How often is this site updated?
FYI, for a different way to get a Maven2 site, I start with an Eclipse update site , and simply reorganize it .
Please change the naming scheme to include the groupId in the JAR name (i.e. org.eclipse.emf.ecore-2.2.2 instead of ecore-2.2.2).
In the ecore case, there is little chance of conflict but there are some 20 JARs which are named “ui”, now, and which have very similar version numbers (because of the way the Eclipse release process works). So when I create a release, I will get conflicts in my lib directory.
I’d also argue for dropping the date from released JARs but that’s a minor issue.
the files there, are named x86-3.3.0-v3346.pom, x86-3.3.0-v3346.jar…
not good, my proposal
so the file name would be
Erg, my apologies. It seems this is a (nother) bug in maven 2.0.6, upgrading to 2.0.8 fixes the problem.
We (the Apache Directory Studio project) are currently trying to move from Ant/Ivy to Maven as build system.
Apache Directory Studio is an Eclipse RCP application, so we were very happy when we saw that you added some eclipse jars in the repo.
However, we experiment issues with some plugins.
For instance, the org.eclipse.core.runtime.compatibility.registry plugin, version 3.2.100-v20070316, fails at the jar verification in Eclipse.
I had a closer look at what’s happening and it seems the MANIFEST.MF has been modified. The line “Archiver-Version : Plexus Archiver” has been added and the SHA1-Digest of the runtime_registry_compatibilty.jar has been modified.
The same thing happens on the org.eclipse.ui.workbench.compatibility plugin, version 3.2.0.I20070319-0010.
Is it possible to upload a modified version of them ?
We also wanted to know if you plan to release the latest jars included in 18.104.22.168 versions of Eclipse ?
We depend on these ones for our RCP application.
umm, weird that they are modified, i dont think there’s any code for that.
i looked a few and seems that only the ones in http://repo1.maven.org/maven2/org/eclipse/core/runtime/compatibility/registry/ are modified
You could open an issue at http://jira.codehaus.org/browse/MECLIPSE
I’ll try to upload new versions when I have time but probably is not going to be too soon. You could run the eclipse:to-maven goal http://maven.apache.org/plugins/maven-eclipse-plugin/to-maven-mojo.html
I created the Jira http://jira.codehaus.org/browse/MECLIPSE-386.
Unfortunately I have a problem with the version ranges.
I put this in my POM:
And I get:
Unable to resolve artifact: Couldn’t find a version in [3.3.0-v3346, 3.2.1-v3235e] to match range [3.3.0,4.0.0)
Are the version numbers ill-formed, is my maven too new, or too old?
My Maven version is whatever netbeans 6.0.1 bundles.
That’s a known problem, you need to use dependencyManagement to force a particular version, see http://www.jroller.com/carlossg/entry/slides_from_eclipsecon
I am having some troubles building an RCP application with maven. I had to modify DefaultMaven2OsgiConverter. here is a brief explanation of my problem:
* I have org.eclipse.core.commands_3.4.0.I20080509-2000.jar in my eclipse/plugins directory
* After a mvn eclipse:to-maven, I have org/eclipse/core/commands/3.4.0-I20080509-2000/commands-3.4.0-I20080509-2000.jar in my repository.
*Then I try to build a target platform against which I would build my application, so I run mvn eclipse:install-plugins and it generates me a org.eclipse.core.commands_3.4.0.I20080509_2000.jar (notice the _ instead of the – in the qualifier part)
I am not sure it is a bug and I am not very familiar with maven, but I my opinion doing mvn eclipse:to-maven followed by mvn eclipse :install-plugins I should end up with the same jars, isn’t it ?
My modifications on DefaultMaven2OsgiConverter was to remove every ‘replaceAll( “-“, “_”)’ form the getVersion(String) method. And everything worked well this way…
I would appreciate your point of view on this problem.
It may be a problem with the way the _ and – get transformed. You can open an issue at http://jira.codehaus.org/browse/MECLIPSE with your example.
In regards to MECLIPSE-238 , what are your thoughts on the “official Eclipse repo layout” discussion  from the dev list?
If I correctly understand that discussion, the conventional configuration of artifacts which are bundles should be –
 – http://jira.codehaus.org/browse/MECLIPSE-238
 – http://mail-archives.apache.org/mod_mbox/maven-dev/200805.mbox/%3c69ECB380-90D7-4718-BD2D-A0E22A85B555@maven.org%3e