Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Wrong version resolved from the locally built artefacts

We also deploy our snapshots in Nexus, but fetching p2 artifacts from there would only partly solve the problem, as Nexus p2 addon afaik only supports hosting of OSGi Bundles, not Eclipse features.

We already thought about maintaining sort of integration build p2 repository, which would contain latest versions of all builds, so we can use it as part of the target platform for all our builds. Either by creating this repository in the nightly build and then mixing with the newest local builds if required or updating it incrementally with only the latest version of each module, basically emulating what Nexus p2 feature already does for OSGi bundles. It looks for me like the only possible complete solution. 

Thanks for pointing to the existing bugzilla for this issue. Now I know at least that I am not the only one with this problem.

Regards,
Vladimir

----- Urspr√ľngliche Mail -----
Von: "Jan Sievers" <jan.sievers@xxxxxxx>
An: "Tycho user list" <tycho-user@xxxxxxxxxxx>
Gesendet: Donnerstag, 18. Oktober 2012 13:28:48
Betreff: Re: [tycho-user] Wrong version resolved from the locally built artefacts

it's up to the p2 resolver to choose a solution.
also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=365962 

in your case you could try to use "-Dtycho.localArtifacts=ignore" (or not local maven repo shared by several build jobs to start with) and instead reference the SNAPSHOT build result produced by the upstream project e.g. with a URL to the p2 repository in target/repository produced by a jenkins CI server.

Regards
Jan


-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Wladimir Safonov
Sent: Donnerstag, 18. Oktober 2012 12:42
To: Tycho user list
Subject: Re: [tycho-user] Wrong version resolved from the locally built artefacts

Hello Jan,

I am aware of the new flag, unfortunately that would not help as we actually need local artifacts, well in this specific case the one with the highest version number that is produced by a different build. Eclipse PDE would resolve this correctly, so I would expect for consistency reasons that Tycho would comply with this behaviour.

If it is not possible to support this for some reasons, at least some notice in the documentation would be nice informing the user that when using version ranges in dependencies it is not guaranteed that the latest version will be taken.

Vladimir

----- Urspr√ľngliche Mail -----
Von: "Jan Sievers" <jan.sievers@xxxxxxx>
An: "Tycho user list" <tycho-user@xxxxxxxxxxx>
Gesendet: Donnerstag, 18. Oktober 2012 08:42:19
Betreff: Re: [tycho-user] Wrong version resolved from the locally built artefacts

there is a new flag "-Dtycho.localArtifacts=ignore" in upcoming version 0.16.0 [1]

which should help.

Jan

[1] http://wiki.eclipse.org/Tycho/Release_Notes/0.16 

-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Wladimir Safonov
Sent: Mittwoch, 17. Oktober 2012 18:53
To: Tycho user list
Subject: [tycho-user] Wrong version resolved from the locally built artefacts

Hi there,

I have a question about IU resolution process implemented in Tycho. If there are several bundles matching some version range on a dependency, Tycho would give no guarantee about which bundle will be picked up for the resolved target platform, right? I have a scenario, where I see that not the oldest version "wins" but rather an arbitrary one from all matched. This is an excerpt from the debug output for a module which picks an old version instead of the newest one: 

[DEBUG] Slice:
  <...>
  com.example.helpers 1.1.0.v20120711-1215
  <...>
  com.example.helpers 1.2.0.v20121016-1005
  <...>

[DEBUG] Resolved IUs:
  <...>
  com.example.helpers 1.1.0.v20120711-1215
  <...>

Dependency on the com.example.helpers bundle is specified as a range [1.1.0,). I have several modules with exactly this dependency. The quirky thing is that some of them are resolved with the newest version (1.2.0), but some are not. All versions of the com.example.helpers bundle come from the local repository and never from the build reactor. 

Now, as we basically have this situation on our CI server, I know that I can fix it just by clearing the local repository on the server once in a while. But shouldn't Tycho provide a consistent behaviour here and pick up correct latest version when resolved against a version range in multiple alternatives scenario?

Thanks in advance!


Regards, Vladimir
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top