Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-dev] Making o.e.m2e.maven.runtime and o.e.recommenders.aether get along better

Hi all,

I am a committer to the Eclipse Code Recommenders [1] project, which
happily uses Aether (and a bit of Maven Indexing) under the hood to
resolve the model artifacts that drive its intelligent code completion.

Now, I have just spend a few rather frustrating hours tracking down
package uses conflicts that arise if both o.e.m2e.maven.runtime and our
own o.e.recommenders.aether bundle are installed. These two just
(currently) don't get along very well -- and neither one is solely to blame!

In particular, both bundles export packages like
org.sonatype.aether.artifact without importing them (thereby preventing
one bundle standing in for the other) and without specifying package
versions. Moreover, neither bundle properly declares uses contraints, a
very basic, but very critical one that often bites us being

  org.sonatype.aether.util.artifact;uses:="org.sonatype.aether.artifact"

Without it, you (non-deterministically) end up with
org.sonatype.aether.util.artifact.DefaultArtifact being imported from
one bundle and org.sonatype.aether.artifact.Artifact from the other.
This sooner or later blows up with a ClassCastException or an LinkageError.

So, neither bundle is an OSGi model citizen, but why not change that? In
particular, we at Code Recommenders might be able to switch entirely to
o.e.m2e.maven.runtime for all things Aether. (Currently, we are just
using aether-connector-file-1.13.1.jar, which o.e.m2e.maven.runtime
doesn't ship with -- but maybe aether-connector-wagon.jar +
wagon-file.jar can replace those.)

At any rate, it would be great if we could coordinate a bit better in
the post-Kepler time frame.

Best regards,

Andreas

[1] <http://eclipse.org/recommenders/>
[2]
<http://build.codetrails.com/updates/3rd/head/plugins/org.eclipse.recommenders.aether_1.0.0.201305171609.jar>
-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top