Skip to content

Dependency precedence for m2e/maven and eclipse target bundles #5951

@peterkir

Description

@peterkir

The bundle org.eclipse.paho.mqttv5.client has an issue.
There are bundles with different content and the SAME version 1.2.5 in the wild.

The bundle available via Maven Central is corrupt!
It contains ONLY the export Export-Package: org.eclipse.paho.mqttv5.client;version="1.2.5"

We used in our target a directory based PAHO bundle, which had the correct exports ...

Export-Package: org.eclipse.paho.mqttv5.client;version="1.2.5",
 org.eclipse.paho.mqttv5.client.persist;version="1.2.5",
 org.eclipse.paho.mqttv5.common;version="1.2.5",
 org.eclipse.paho.mqttv5.common.packet;version="1.2.5",
 org.eclipse.paho.mqttv5.common.packet.util;version="1.2.5",
 org.eclipse.paho.mqttv5.common.util;version="1.2.5"

This is also (like the Maven Central) an official Eclipse Paho bundle. (it is officially signed and correctly working)
But I do not remember the source I got it from.

So we are facing a very strange situation now. 2 bundles with same BSN and same Version BUT different content.

Tycho build gives the corrupt maven based PAHO bundle precedence over the bundle from the target causing the build to fail.
Even when the working PAHO bundle is in the target. Eclipse is showing and using the target bundle - IDE works, BUT tycho build fails.

As a workaround I created an wrapped bundle with a Bundle-Version: 1.2.5.99_${tstamp;yyyyMMdd-HHmmss}
which is higher than the 1.2.5 and newer and can be referenced and successfully used for Eclipse, Tycho-build and director installed products.

I know that this scenario is not really a Tycho issue, BUT it would be great to get warning or error showing that a bundle is available in maven cache and used from there and not from the target directory location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions