[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Could Tycho resolve Bundle references from Maven repositories?

Hi Reiner,


Sorry for the delay.


The tricky part of this proposal is the questions which bundle dependencies should be looked for in the Maven repository. (a) The current reactor, (b) only the current module, or (c) even all dependencies?


I don’t think that option c will work technically, and I don’t really like option a because the reactor is something that can change, so having the build behave differently depending on what is also in the reactor is not a particularly good idea.


This basically only leaves option b, but then it won’t be very useful. You can use it to e.g. reference a bundle ext1 from your bundle build automagically (i.e. have ext1 be optained from groupId=com.mycompany.product1, artifactId=ext1), but already the build of a feature including your bundle will fail because the feature doesn’t directly referenced ext1, hence won’t have it in its target platform (note: each module gets a separate target platform in Tycho), and hence the resolution will fail.


I think we need to get back one step and look at what you are trying to achieve.






From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Hille-Doering, Reiner
Sent: 11 May 2011 12:28
To: tycho-user@xxxxxxxxxxx
Subject: [tycho-user] Could Tycho resolve Bundle references from Maven repositories?



as explained in https://issues.sonatype.org/browse/TYCHO-335 Tycho can resolve bundle references from MANIFEST.MF etc in local repositories and of course from P2 repos, but not in remote Maven repositories. The mentioned work around on the issue using an “orbit” update sites works only for builds that deploy and use the updatesite consistently. Local builds can produce inconsistent results.

Of course I could use “<pomDependencies>consider</pomDependencies>”, but this requires to repeat all bundle references in the POM, which is ugly and error prone.


What’s about the following proposal:

Tycho could resolve bundle references from Maven repositories, if it could create a GAV. As a BundleSymbolicName and usually also a version is available , the only missing part is a GroupID. For this the POM could contain a list of group IDs that the resolver should search, e.g.















I’m not sure if also a list of versions need to be provided if the bundle references does not contain any version or a range that is not strict enough.


I’m aware that this proposal would not help for package references, but there is a huge benefit for projects that use only bundle references.