Discussion:
[tycho-user] .target hierarchies
Christophe Bouhier
2014-08-06 09:43:52 UTC
Permalink
Hi,

I find myself repeating P2 repository locations in various target files. Is
there a way in tycho add multiple target files? (Which would be merged),
Ideally a target hierarchy would be nice to have.

Thank you,
Christophe
Pierre-Charles David
2014-08-06 10:05:27 UTC
Permalink
Post by Christophe Bouhier
Hi,
Hi.
Post by Christophe Bouhier
I find myself repeating P2 repository locations in various target
files. Is there a way in tycho add multiple target files? (Which would
be merged), Ideally a target hierarchy would be nice to have.
I don't think it is possible with .target files themselves, but you can
have a look at [1] which provides a higher-level textual DSL to define
your target platforms, and which supports reuse/inclusion of commonly
used parts. The source files in the DSL can generate fully-resolved
.target files usable both inside Eclipse and by Tycho.

We use it extensively in Sirius [2] and even publish the target
definitions as part of our build at [3] (click on "Show directory
contents." to see the files). The DSL can resolve target definitions
accessible through http, so a downstream project can add a line like
this in its target definition and reuse the exact definition used by
Sirius itself with zero duplication:

include
"http://download.eclipse.org/sirius/updates/nightly/targets/sirius_luna.targetplatform"


[1] https://github.com/mbarbero/fr.obeo.releng.targetplatform
[2]
http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/releng/org.eclipse.sirius.targets
[3] http://download.eclipse.org/sirius/updates/nightly/targets/
Christophe Bouhier
2014-08-06 11:25:45 UTC
Permalink
Merci Pierre-Charles!
Spot-on, exactly what I need.
rgds Christophe
p.s. Ironic, we need DSL's to generate DSL's. (Which .a target is).


On Wed, Aug 6, 2014 at 12:05 PM, Pierre-Charles David <
Post by Pierre-Charles David
Post by Christophe Bouhier
Hi,
Hi.
Post by Christophe Bouhier
I find myself repeating P2 repository locations in various target files.
Is there a way in tycho add multiple target files? (Which would be merged),
Ideally a target hierarchy would be nice to have.
I don't think it is possible with .target files themselves, but you can
have a look at [1] which provides a higher-level textual DSL to define your
target platforms, and which supports reuse/inclusion of commonly used
parts. The source files in the DSL can generate fully-resolved .target
files usable both inside Eclipse and by Tycho.
We use it extensively in Sirius [2] and even publish the target
definitions as part of our build at [3] (click on "Show directory
contents." to see the files). The DSL can resolve target definitions
accessible through http, so a downstream project can add a line like this
in its target definition and reuse the exact definition used by Sirius
include "http://download.eclipse.org/sirius/updates/nightly/
targets/sirius_luna.targetplatform"
[1] https://github.com/mbarbero/fr.obeo.releng.targetplatform
[2] http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/
tree/releng/org.eclipse.sirius.targets
[3] http://download.eclipse.org/sirius/updates/nightly/targets/
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christophe Bouhier
2014-08-06 11:46:13 UTC
Permalink
Pierre-Charles,

One question about your usage pattern.
The help shows a pom.xml which can generate the .target from a tpd.
what is the usecase for this? (To do it in the build cycle I mean).

Thanks for this great tool, using it already!
Cheers Christophe
Post by Christophe Bouhier
Merci Pierre-Charles!
Spot-on, exactly what I need.
rgds Christophe
p.s. Ironic, we need DSL's to generate DSL's. (Which .a target is).
On Wed, Aug 6, 2014 at 12:05 PM, Pierre-Charles David <
Post by Pierre-Charles David
Post by Christophe Bouhier
Hi,
Hi.
Post by Christophe Bouhier
I find myself repeating P2 repository locations in various target files.
Is there a way in tycho add multiple target files? (Which would be merged),
Ideally a target hierarchy would be nice to have.
I don't think it is possible with .target files themselves, but you can
have a look at [1] which provides a higher-level textual DSL to define your
target platforms, and which supports reuse/inclusion of commonly used
parts. The source files in the DSL can generate fully-resolved .target
files usable both inside Eclipse and by Tycho.
We use it extensively in Sirius [2] and even publish the target
definitions as part of our build at [3] (click on "Show directory
contents." to see the files). The DSL can resolve target definitions
accessible through http, so a downstream project can add a line like this
in its target definition and reuse the exact definition used by Sirius
include "http://download.eclipse.org/sirius/updates/nightly/
targets/sirius_luna.targetplatform"
[1] https://github.com/mbarbero/fr.obeo.releng.targetplatform
[2] http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/
tree/releng/org.eclipse.sirius.targets
[3] http://download.eclipse.org/sirius/updates/nightly/targets/
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Mikaël Barbero
2014-08-06 12:19:53 UTC
Permalink
Hi Christophe,

Pierre-Charles has been quicker than me to mention the tool ;) 

Regarding the use case about generating the .target during the build cycle, it has been done after a request from users that wanted to launch the generation in a dedicated profile before launching the real build. These users did not wanted to push .target file on any SCM as it is generated artifacts. This is the kind of command they launch:

mvm clean package -P genTargetPlatform && mvn clean package

This way, they truly single-source the definition of their target platform
 

If you see any bugs or enhancement for the project, please feel free to raise a bug on the github project page.

Cheers,
Mikaël Barbero

On 6 août 2014 at 13:46:49, Christophe Bouhier (***@gmail.com) wrote:

Pierre-Charles,

One question about your usage pattern.
The help shows a pom.xml which can generate the .target from a tpd.
what is the usecase for this? (To do it in the build cycle I mean).

Thanks for this great tool, using it already!
Cheers Christophe

On Wed, Aug 6, 2014 at 1:25 PM, Christophe Bouhier <***@gmail.com> wrote:
Merci Pierre-Charles!
Spot-on, exactly what I need.
rgds Christophe
p.s. Ironic, we need DSL's to generate DSL's. (Which .a target is).


On Wed, Aug 6, 2014 at 12:05 PM, Pierre-Charles David <pierre-***@obeo.fr> wrote:
Le 06/08/2014 11:43, Christophe Bouhier a écrit :
Hi,
Hi.


I find myself repeating P2 repository locations in various target files. Is there a way in tycho add multiple target files? (Which would be merged), Ideally a target hierarchy would be nice to have.

I don't think it is possible with .target files themselves, but you can have a look at [1] which provides a higher-level textual DSL to define your target platforms, and which supports reuse/inclusion of commonly used parts. The source files in the DSL can generate fully-resolved .target files usable both inside Eclipse and by Tycho.

We use it extensively in Sirius [2] and even publish the target definitions as part of our build at [3] (click on "Show directory contents." to see the files). The DSL can resolve target definitions accessible through http, so a downstream project can add a line like this in its target definition and reuse the exact definition used by Sirius itself with zero duplication:

include "http://download.eclipse.org/sirius/updates/nightly/targets/sirius_luna.targetplatform"


[1] https://github.com/mbarbero/fr.obeo.releng.targetplatform
[2] http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/releng/org.eclipse.sirius.targets
[3] http://download.eclipse.org/sirius/updates/nightly/targets/

_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christophe Bouhier
2014-08-06 14:25:00 UTC
Permalink
Hi Mikael,

I am already up and running with the TP DSL tool!
Instant love I would say, See some feature requests on the github :-)

Cheers Christope
Post by Mikaël Barbero
Hi Christophe,
Pierre-Charles has been quicker than me to mention the tool ;)
Regarding the use case about generating the .target during the build
cycle, it has been done after a request from users that wanted to launch
the generation in a dedicated profile before launching the real build.
These users did not wanted to push .target file on any SCM as it is
mvm clean package -P genTargetPlatform && mvn clean package
This way, they truly single-source the definition of their target
platform

If you see any bugs or enhancement for the project, please feel free to
raise a bug on the github project page.
Cheers,
Mikaël Barbero
Pierre-Charles,
One question about your usage pattern.
The help shows a pom.xml which can generate the .target from a tpd.
what is the usecase for this? (To do it in the build cycle I mean).
Thanks for this great tool, using it already!
Cheers Christophe
Post by Christophe Bouhier
Merci Pierre-Charles!
Spot-on, exactly what I need.
rgds Christophe
p.s. Ironic, we need DSL's to generate DSL's. (Which .a target is).
On Wed, Aug 6, 2014 at 12:05 PM, Pierre-Charles David <
Post by Pierre-Charles David
Post by Christophe Bouhier
Hi,
Hi.
Post by Christophe Bouhier
I find myself repeating P2 repository locations in various target
files. Is there a way in tycho add multiple target files? (Which would be
merged), Ideally a target hierarchy would be nice to have.
I don't think it is possible with .target files themselves, but you can
have a look at [1] which provides a higher-level textual DSL to define your
target platforms, and which supports reuse/inclusion of commonly used
parts. The source files in the DSL can generate fully-resolved .target
files usable both inside Eclipse and by Tycho.
We use it extensively in Sirius [2] and even publish the target
definitions as part of our build at [3] (click on "Show directory
contents." to see the files). The DSL can resolve target definitions
accessible through http, so a downstream project can add a line like this
in its target definition and reuse the exact definition used by Sirius
include "
http://download.eclipse.org/sirius/updates/nightly/targets/sirius_luna.targetplatform
"
[1] https://github.com/mbarbero/fr.obeo.releng.targetplatform
[2]
http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/releng/org.eclipse.sirius.targets
[3] http://download.eclipse.org/sirius/updates/nightly/targets/
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
Mickael Istria
2014-08-06 12:58:39 UTC
Permalink
Hi,

As many people already answered, it's not possible to define inheritance
between .target files. But Tycho can allow multiple .target file as
input of the target-platform-configuration plugin:
http://wiki.eclipse.org/Tycho/Target_Platform#Target_files , resulting
in a target-platform based as a merge of various target definitions.
However, this is a Tycho-specific mechanism that doesn't work in Eclipse
IDE.

Another alternative, that we use in JBoss Tools, consists in a mechanism
to define target definition as a merge of several targets. Code is here:
https://github.com/jbosstools/jbosstools-maven-plugins/blob/master/tycho-plugins/target-platform-utils/src/main/java/org/jboss/tools/tycho/targets/MergeTargetsMojo.java
and plugin is available on JBoss Nexus repository. Then your merged
.target file can be deployed on an artifact manager and consumed later
by other Maven builds, and you can even directly consume the file in
your Eclipse IDE.
See an example of usage
https://github.com/jbosstools/jbosstools-integration-stack/blob/master/target-platform/pom.xml#L116

HTH
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Gunnar Wagenknecht
2014-08-13 12:19:15 UTC
Permalink
Hi,
Post by Christophe Bouhier
I find myself repeating P2 repository locations in various target
files. Is there a way in tycho add multiple target files? (Which would
be merged), Ideally a target hierarchy would be nice to have.
This should be possible. See this bugzilla for details:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=380120#c4

-Gunnar
--
Gunnar Wagenknecht
***@wagenknecht.org
Loading...