Skip to main content

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

Can you suggest maven-bundle-plugin configuration that would generate
uses attributes for m2e? Through git-format-patch formatted patch
attached to bugzilla, preferably ;-)

Note that m2e uses Require-Bundle, so it is not affected by this
problem as far as I can tell. Maybe this is something you maybe able to
do for Code Recommenders as well.

--
Regards,
Igor

On 2013-05-28 12:58 PM, Andreas Sewe wrote:
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>



Back to the top