Discussion:
Platform-specific features in a multi-platform build
(too old to reply)
Mickael Istria
2016-09-22 07:41:19 UTC
Permalink
Hi all,

My use case is the following: I'm building en eclipse-repository for
multiple platforms (mac,linux,win32) which contains some features that
are platform-specific (with a filter on the feature). When I try to
build it, Tycho fails complaining for example that a win32 feature
cannot be resolved for a macosx target.
Do you know how to make Tycho more permissive regarding this and go on
despite this platform incompatibility?

Cheers,
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Paul Roubekas
2016-09-22 10:15:14 UTC
Permalink
In theory these two article should solve your problem. I could not get
them to work. I posted the question on this email list
(https://dev.eclipse.org/mhonarc/lists/tycho-user/msg07443.html) but I
could not get the technique to work. I asked for a MCVE
(http://stackoverflow.com/help/mcve) and got no reply. Maybe you can
get it to work.

https://codeiseasy.wordpress.com/2012/07/31/including-a-jre-in-a-tycho-b
<https://codeiseasy.wordpress.com/2012/07/31/including-a-jre-in-a-tycho-build>uild
<https://codeiseasy.wordpress.com/2012/07/31/including-a-jre-in-a-tycho-build>,
four years old, and this blog post

http://eclipseo.blogspot.com/2014/11/bundle-jre-along-with-your-product
<http://eclipseo.blogspot.com/2014/11/bundle-jre-along-with-your-product.html>.html
<http://eclipseo.blogspot.com/2014/11/bundle-jre-along-with-your-product.html>,
two years old. The newer blog post skips the step where a p2.inf

file is created.
Post by Mickael Istria
Hi all,
My use case is the following: I'm building en eclipse-repository for
multiple platforms (mac,linux,win32) which contains some features that
are platform-specific (with a filter on the feature). When I try to
build it, Tycho fails complaining for example that a win32 feature
cannot be resolved for a macosx target.
Do you know how to make Tycho more permissive regarding this and go on
despite this platform incompatibility?
Cheers,
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
_______________________________________________
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
--
The people that bring you Usque <http://Usque.software/>.
Mickael Istria
2016-09-22 10:34:37 UTC
Permalink
Thanks.
However I don't think this helps me much.

What I'm trying is to create a p2 repository (with Tycho) that is
multi-platform and includes features that are specific to only one or a
few of these platforms, not all.

For example: if I want to create a multi-platform repository containing
the org.eclipse.e4.rcp feature (including all platform-specific SWT
fragments) and linuxtools feature (some of them being specific to
linux). I set target-platform-configuration's environments to the
platforms I target (linux, win32) and try to build the site.
Then, Tycho fails because on Windows, the linuxtools feature cannot be
resolved. Instead, I'd like it to carry on and still build my site even
if some content isn't suitable for one of the target environments.
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Mickael Istria
2016-09-22 17:47:40 UTC
Permalink
Here is the real context, in case it helps:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=500769#c4
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Dirk Fauth
2016-09-22 18:32:08 UTC
Permalink
Hi,

Really interesting quest and I'm also interested in the solution. Would be
great if you could provide a solution here.

What I have seen (but not tested yet) is to add a
target-platform-configuration maven plugin configuration in the pom of the
platform dependent bundle.

An example could be here
http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-its/projects/TYCHO242multiplatformReactor?id=tycho-0.15.0

Hope that helps
Dirk
Here is the real context, in case it helps: https://bugs.eclipse.org/bugs/
show_bug.cgi?id=500769#c4
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
_______________________________________________
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
2016-09-27 11:16:32 UTC
Permalink
Post by Mickael Istria
Hi all,
My use case is the following: I'm building en eclipse-repository for
multiple platforms (mac,linux,win32) which contains some features that
are platform-specific (with a filter on the feature). When I try to
build it, Tycho fails complaining for example that a win32 feature
cannot be resolved for a macosx target.
Do you know how to make Tycho more permissive regarding this and go on
despite this platform incompatibility?
Still on this topic:
Is it possible to tweak the build of an eclipse-repository with a
p2.inf? I imagine if I can generate a p2.inf that makes such
platform-specific features optional, it will solve my issue.

Thanks in advance,
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Justin Georgeson
2016-09-27 12:04:03 UTC
Permalink
Can you only include platform-relevant projects in your reactor (and then only configure that one platform in your tycho-platform-configuration)? You can use an eclipse-repository project to gather all those platform-specific features/plugins on in the build each platform, copy the resulting software site from each platform to a "master" build platform, then use those local sites to build the final multi-platform site with all platforms enabled in tycho-platform-configuration.

From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Mickael Istria
Sent: Tuesday, September 27, 2016 6:17 AM
To: tycho-***@eclipse.org
Subject: [EXTERNAL] Re: [tycho-user] Platform-specific features in a multi-platform build

On 09/22/2016 09:41 AM, Mickael Istria wrote:

Hi all,
My use case is the following: I'm building en eclipse-repository for multiple platforms (mac,linux,win32) which contains some features that are platform-specific (with a filter on the feature). When I try to build it, Tycho fails complaining for example that a win32 feature cannot be resolved for a macosx target.
Do you know how to make Tycho more permissive regarding this and go on despite this platform incompatibility?

Still on this topic:
Is it possible to tweak the build of an eclipse-repository with a p2.inf? I imagine if I can generate a p2.inf that makes such platform-specific features optional, it will solve my issue.

Thanks in advance,
--
Mickael Istria
Eclipse developer for Red Hat Developers<https://urldefense.proofpoint.com/v2/url?u=http-3A__developers.redhat.com&d=DQMC-g&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=ZtYe5DSW_92udBPfZpfmdhMu8WdT6TtZdtOVTpyL33s&s=rF059Jkirw_jsKOT02iGXDI5dvoRrioincTpoXWUYNo&e=>
My blog<https://urldefense.proofpoint.com/v2/url?u=http-3A__mickaelistria.wordpress.com&d=DQMC-g&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=ZtYe5DSW_92udBPfZpfmdhMu8WdT6TtZdtOVTpyL33s&s=ZwRp80ykkCpPsV7ovufsa6WSIPucMXxYMba1nYMh6C4&e=> - My Tweets<https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_mickaelistria&d=DQMC-g&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dLxYM3PBhAqFnkH7uKz_OVZL1uyui4QoEmBCjCmEiTk&m=ZtYe5DSW_92udBPfZpfmdhMu8WdT6TtZdtOVTpyL33s&s=mRfqA2CsMVtj1-XsOeFzG9jK1X5kHEFs3rBoYA53uBM&e=>

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
Christian Pontesegger
2016-10-03 22:00:08 UTC
Permalink
I would also suggest to have multiple local builds: 1 for each target
platform. Then use the tycho p2-mirror job to merge those local
repositories into a big one containing all those features.

HTH Christian
Post by Justin Georgeson
Can you only include platform-relevant projects in your reactor (and
then only configure that one platform in your
tycho-platform-configuration)? You can use an eclipse-repository
project to gather all those platform-specific features/plugins on in
the build each platform, copy the resulting software site from each
platform to a “master” build platform, then use those local sites to
build the final multi-platform site with all platforms enabled in
tycho-platform-configuration.
Matthew Piggott
2016-10-04 02:08:26 UTC
Permalink
You may be able to do it in the same build, at least I was able to for ours
which while not cross-platform builds bundles for multiple version of
Eclipse.

On 3 October 2016 at 18:00, Christian Pontesegger <
Post by Christian Pontesegger
I would also suggest to have multiple local builds: 1 for each target
platform. Then use the tycho p2-mirror job to merge those local
repositories into a big one containing all those features.
HTH Christian
Can you only include platform-relevant projects in your reactor (and then
only configure that one platform in your tycho-platform-configuration)? You
can use an eclipse-repository project to gather all those platform-specific
features/plugins on in the build each platform, copy the resulting software
site from each platform to a “master” build platform, then use those local
sites to build the final multi-platform site with all platforms enabled in
tycho-platform-configuration.
_______________________________________________
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
2016-10-04 06:25:24 UTC
Permalink
Post by Christian Pontesegger
I would also suggest to have multiple local builds: 1 for each target
platform. Then use the tycho p2-mirror job to merge those local
repositories into a big one containing all those features.
That doesn't work as some of the root elements (features directly listed
in the category.xml) are platform-specific. Dependency resolution fails
for those features whenever build is trying to resolve for another
platform. Ideally, I'd like a way to treat those features as optional.
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Axel Guckelsberger
2016-10-04 06:32:35 UTC
Permalink
Hi Mickael,

what works for me is a root feature including the platform-specific features like this:

product includes
com.oracle.jre.feature includes
com.oracle.jre.<platform>.feature

HTH
Axel
Post by Mickael Istria
Post by Christian Pontesegger
I would also suggest to have multiple local builds: 1 for each target
platform. Then use the tycho p2-mirror job to merge those local
repositories into a big one containing all those features.
That doesn't work as some of the root elements (features directly listed
in the category.xml) are platform-specific. Dependency resolution fails
for those features whenever build is trying to resolve for another
platform. Ideally, I'd like a way to treat those features as optional.
Mickael Istria
2016-10-04 06:35:09 UTC
Permalink
Post by Axel Guckelsberger
Hi Mickael,
product includes
com.oracle.jre.feature includes
com.oracle.jre.<platform>.feature
Yes, I'm aware of this and wanted to avoid it if possible. But at the
moment, it seems to be the only way forward.
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Mickael Istria
2016-10-12 16:12:22 UTC
Permalink
Hi again,

I've got another correlated question: can/could Tycho's
assemble-repository mojo be configured to treat units as optional (not
fail if cannot be resolved)?
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Mickael Istria
2016-10-12 16:20:20 UTC
Permalink
Post by Mickael Istria
I've got another correlated question: can/could Tycho's
assemble-repository mojo be configured to treat units as optional (not
fail if cannot be resolved)?
I opened a bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=505812 , it
may also or rather involve target-platform-configuration.
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Continue reading on narkive:
Loading...