Question

From the site https://wiki.eclipse.org/Tycho/Target_Platform, I infer the following:

  • If the 'repositories' section contains a p2 repository, everything inside that repository is automatically considered part of the target platform as far as Tycho is concerned.
  • If a target definition file is referenced, everything inside that target definition file is considered part of the target platform as far as tycho is concerned.

Let's say that I have a repository under 'repositories' that points to http://download.eclipse.org/releases/indigo like in the example. Furthermore, I declare a target definition file that points to http://download.eclipse.org/releases/helios instead.

In Eclipse, developers then use the target definition file as the target platform. For dependencies in individual plug-in projects no version is defined, since the versions of the bundles are already defined by the target definition file.

The question: Will Tycho build using Indigo or Helios versions?

Was it helpful?

Solution

The target platform will contain both content from Indigo and Helios. Quoting the Target Platform wiki page:

In case multiple target platform configuration approaches are combined, the target platform contains the union of the content defined through each approach.

So for the dependency resolution, Tycho could either use Indigo bundles, or Helios bundles, or a mixture of these.

The resolution is based on the p2 planner which finds a valid solution to satisfy the requirements. In case there are multiple solutions, the p2 planner has a preference towards later bundle versions and a small set of transitive dependencies. These preferences often contradict each other, e.g. when a later version of a bundle has a larger set of transitive dependencies. So in general it is hard to predict which versions are picked in such a case.

So, if you need to know what your bundles are compiled against, use a target platform which appropriately restricts the available versions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top