[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tycho-user] pom-first dependencies and target platform
- From: "Oberlies, Tobias" <tobias.oberlies@xxxxxxx>
- Date: Fri, 13 Jul 2012 11:20:56 +0200
- Accept-language: en-US, de-DE
- Acceptlanguage: en-US, de-DE
- Delivered-to: email@example.com
- Thread-index: Ac1eWy0Nipf67jtJSiCPshzqCnF4IwB8wP2Q
- Thread-topic: [tycho-user] pom-first dependencies and target platform
I think I understand the problem you are seeing, but your reasoning is not quite right.
The POM dependencies that are being considered are the effective dependencies (as in the effective POM) of the current module. This is done at a point in the build where Tycho has not yet injected the OSGi dependencies into the Maven model. So if you have an eclipse-plugin module with a POM dependencies on some GAV bundle, and an eclipse-feature module that includes your bundle, there is no POM/Maven model dependency from the eclipse-feature module to the GAV bundle. Therefore the GAV bundle would not be considered for the eclipse-feature module and hence the (transitive) dependency resolution for that module would fail.
To work around this problem, one puts the POM dependencies into the parent POM (together with the pomDependencies=consider configuration), so that the POM dependencies become part of the target platform of *all* modules and hence transitive dependencies can be resolved. This is really a known limitation , but AFAIK there is no bug report for this yet...
I've also added a note about this pitfall in the target platform documentation .
> -----Original Message-----
> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-
> bounces@xxxxxxxxxxx] On Behalf Of Barrie Treloar
> Sent: Dienstag, 10. Juli 2012 07:16
> To: Tycho user list
> Subject: [tycho-user] pom-first dependencies and target platform
> This should be blindingly obvious but I guess I still have my Maven
> dependency hat on and therefore getting confused.
> I previously had the dependency in my bundle's pom.xml and then wasted
> a day or so trying to work out why this isn't working.
> I've updated http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-
> to include a note about the dependency inclusion on a pom-first
> Note: The dependencies that that the target platform will consider are
> the ones defined in the pom that specifies the
> Your bundles should not have any Maven dependencies since OSGi
> dependencies are specified Manifest-First in MANIFEST.MF as
> Import-Package (or Require-Bundle).
> tycho-user mailing list