Skip to main content

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

Hi,

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

> Import-Package: com.google.common.base;version="[15.0.0,16.0.0)"

in its MANIFEST.MF. During compilation, this works fine. It sees version
15.0.0 of com.google.guava (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] +- p2.eclipse-plugin:com.google.guava:jar:21.0.0.v20170206-1425:system

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/Zips.java:56: Undefined reference: Object com.google.common.io.OutputSupplier.getOutput()
> [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/Json.java:152: Undefined reference: Object com.google.common.io.InputSupplier.getInput()

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,

Andreas

-- 
Codetrails GmbH
The knowledge transfer company

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

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

Attachment: signature.asc
Description: OpenPGP digital signature


Back to the top