Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Bug? mvn dependency:tree approximate of dependencies wrong

If I am not mistaken the dependencies injected into the maven model should be the ones resolved by the p2 resolver.
I would not expect a difference between dependency:tree and what the compiler sees.


On 17/02/2017, 17:39, "tycho-user-bounces@xxxxxxxxxxx on behalf of Andreas Sewe" <tycho-user-bounces@xxxxxxxxxxx on behalf of andreas.sewe@xxxxxxxxxxxxxx> wrote:


I my build, there are two versions of bundle 15.0.0
and 21.0.0. Now, one of my plugins has

> Import-Package:;version="[15.0.0,16.0.0)"

in its MANIFEST.MF. During compilation, this works fine. It sees version
15.0.0 of (which exports the above package).

During a "mvn dependency:tree" however, Maven lists (only) Guava 21.0.0
as a dependency:

> [INFO] ------------------------------------------------------------------------
> [INFO] Building org.eclipse.epp.logging.aeri.ide 2.0.3-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ org.eclipse.epp.logging.aeri.ide ---
> [INFO] org.eclipse.epp.logging:org.eclipse.epp.logging.aeri.ide:eclipse-plugin:2.0.3-SNAPSHOT
> [INFO] +-

Apparently, one of org.eclipse.epp.logging.aeri.ide's own dependencies
pulls in Guava 21.0.0 transitively.

The resulting discrepancy between the OSGi world and Tycho's
approximation of the rest of the world causes other plugins, like the
animal-sniffer-maven-plugin, to become confused:

> [INFO] --- animal-sniffer-maven-plugin:1.15:check (check-signature) @ org.eclipse.epp.logging.aeri.ide ---
> [INFO] Checking unresolved references to org.codehaus.mojo.signature:java18:1.0
> [ERROR] /tmp/org.eclipse.epp.logging/bundles/org.eclipse.epp.logging.aeri.ide/src/org/eclipse/epp/internal/logging/aeri/ide/utils/ Undefined reference: Object
> [ERROR] /tmp/org.eclipse.epp.logging/git/org.eclipse.epp.logging/bundles/org.eclipse.epp.logging.aeri.ide/src/org/eclipse/epp/internal/logging/aeri/ide/server/json/ Undefined reference: Object

Guava 15.0.0 contains OutputSupplier.getOutput() and
InputSupplier.getInput(), but apparently the animal-sniffer-maven-plugin
is looking at the wrong version, namely Guava 21.0.0.

Is this a bug with Tycho 1.0.0? I would think so, as being able to use
non-Tycho Maven plugins like animal-sniffer-maven-plugin seems like a
huge win (and so far has worked fine).

Best wishes,


Codetrails GmbH
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791

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

Back to the top