On 05/22/2014 10:18 PM, Steinar Bang
wrote:
As far as I can tell from today's google searches, that won't be the
case: there can only be one target platform setting per workspace:
Window->Preferences
then
Plug-in Development->Target Platform
The choices in that property dialog window are the Running Platform, and
all of the projects containing .target files, but there can only be one
selected at any given time.
There is a still-open issue for making it possible to have more than one
target platform definition per workspace, that was almost fixed for
eclipse 3.8, but was dropped for lack of resources:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159072
True, in IDE, only one target-platform per workspace.
With Tycho, target-platform is attached to each modules, so modules
can have different targets. Even more, Tycho allows to reference
multiple target definition (.target files) simultaneously, ending up
with a kind of "merge" of their contents as the target-platform.
So if you have more than one tycho project with different target
platform requirements living in a single eclipse workspace, the simplest
way to make things build, is to ensure that you have all of the
requirements installed in the eclipse itself.
You could also think of statically creating a merged target
definition/.target file, that you can then use in the IDE. We (JBoss
Tools and family) have a mojo that does that:
https://github.com/jbosstools/jbosstools-maven-plugins/blob/master/tycho-plugins/target-platform-utils/src/main/java/org/jboss/tools/tycho/targets/MergeTargetsMojo.java
. See an example of usage at
https://github.com/jbosstools/jbosstools-integration-stack/blob/master/target-platform/pom.xml#L131
.
We do use it to "stack" target definitions: JBoss Tools has a target
definitions containing mostly org.eclipse stuff, JBoss Tools
integration stack builds on top of JBoss Tools so it creates a
target definition which consists of JBoss Tools target-platform +
some additions + JBoss Tools itself. People can import this
target-definition in their IDE and they everything they need.
HTH
|