Discussion:
How to build plugin-based products with platform-specific fragments?
(too old to reply)
Christian Schulz
2013-03-16 12:26:39 UTC
Permalink
Hello,

I have the problem that in my multi platform build with tycho the
platform-specific fragments are missing.
I found the solution here:
http://wiki.eclipse.org/Tycho/FAQ#How_to_build_plugin-based_products_with_platform-specific_fragments.3F

Is there no possibility to get around this configuration?
It would be nice if there is an automatic detection of such a case based
on the environment configuration.

Cheers,

Chris
Oberlies, Tobias
2013-03-18 09:08:03 UTC
Permalink
So you want your Tycho build to build 15 distributions just if you reference an Eclipse release train repository?

To me, this seems like a bad idea.

Regards
Tobias
-----Original Message-----
Sent: Samstag, 16. März 2013 13:27
Subject: [tycho-user] How to build plugin-based products with platform-
specific fragments?
Hello,
I have the problem that in my multi platform build with tycho the
platform-specific fragments are missing.
http://wiki.eclipse.org/Tycho/FAQ#How_to_build_plugin-
based_products_with_platform-specific_fragments.3F
Is there no possibility to get around this configuration?
It would be nice if there is an automatic detection of such a case based
on the environment configuration.
Cheers,
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Oberlies, Tobias
2013-03-18 09:58:26 UTC
Permalink
I just noticed that the FAQ you referred had two parts, and the second part has become obsolete: Since https://bugs.eclipse.org/bugs/show_bug.cgi?id=342890 has been fixed, Tycho no longer needs (and in fact ignores) the ws/os/arch attributes in product files.

You obviously still need to specify the ws/os/arch you want to build for in the target-platform-configuration.

Now that this has been simplified, "How to build plugin-based products with platform-specific fragments" should no longer be an FAQ, so I deleted the entry from the FAQ wiki page.

Regards
Tobias
-----Original Message-----
Sent: Montag, 18. März 2013 10:08
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with
platform-specific fragments?
So you want your Tycho build to build 15 distributions just if you
reference an Eclipse release train repository?
To me, this seems like a bad idea.
Regards
Tobias
-----Original Message-----
Sent: Samstag, 16. März 2013 13:27
Subject: [tycho-user] How to build plugin-based products with platform-
specific fragments?
Hello,
I have the problem that in my multi platform build with tycho the
platform-specific fragments are missing.
http://wiki.eclipse.org/Tycho/FAQ#How_to_build_plugin-
based_products_with_platform-specific_fragments.3F
Is there no possibility to get around this configuration?
It would be nice if there is an automatic detection of such a case based
on the environment configuration.
Cheers,
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christian Schulz
2013-03-18 16:25:47 UTC
Permalink
Hello,

I have read the bug, it seems that I need a feature depending product.
I had a plugin based.

Furthermore I had specified which platforms to build like the following:

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>

But it seems to be ignored in a plugin based product.

Best Regards,

Chris
Christian Schulz
2013-03-20 13:14:39 UTC
Permalink
Hello,

now I have switched to a feature based product, but now I am facing the
same problem.
The platform-specific fragments are missing.

I had setted up the environments like described in my previous mail.
What is going wrong?

Cheers,

Chris
Justin Georgeson
2013-03-20 14:30:28 UTC
Permalink
We have feature-based products with lots of native code to compile into fragments. Our aggregator has profiles like linux-repo and win-repo and the reactor includes all the plugins (host plugins, fragment plugins, test plugins) and a special platform-specific projects for a feature and a repository. These platform builds only enable the tycho-platform-configuration environment that they're building. So at the end of this reactor each platform build machine has a P2 repo of the native fragments. We copy the windows fragment p2 repo to the linux machine, then build a profile that includes those platform-fragment p2 repos and the reactor has our shippable features and products. And this feature/product reactor has all tycho-platform-configuration environments enabled.

It means we're duplicating the compilation of the Java code on each platform but I couldn't see an easy way to avoid that.

-----Original Message-----
From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Christian Schulz
Sent: Wednesday, March 20, 2013 8:15 AM
To: tycho-***@eclipse.org
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?

Hello,

now I have switched to a feature based product, but now I am facing the same problem.
The platform-specific fragments are missing.

I had setted up the environments like described in my previous mail.
What is going wrong?

Cheers,

Chris
_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tycho-user

----------------------------------------------------------------------
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 Schulz
2013-03-20 15:09:47 UTC
Permalink
Hello Justin,

thanks for the explaination.
In my case the SWT fragments are missing.

The plugin based way was easy with including all plugins and relation to
the os/ws.
But it isn't the recommened way. So I switched to the feature based
product, because
it should handle all on it own with a valid environment configuration in
the pom.xml.
I have following configuration for the environments:

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
...
</configuration>
</plugin>

I thought it is enough to define something like that and tycho will use the
fragments, whcih are needed by the environment.
But it seems not to work.

In general I got some problems with the feature based product.
I got after successful build following exception:
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench"
could not be found in the registry

I had to include as dependency org.eclipse.ui.ide.application. I don't
know why, but it works after it.

Perhaps I have something wrong in the tycho configuration or similar.

Cheers,

Chris
Post by Justin Georgeson
We have feature-based products with lots of native code to compile into fragments. Our aggregator has profiles like linux-repo and win-repo and the reactor includes all the plugins (host plugins, fragment plugins, test plugins) and a special platform-specific projects for a feature and a repository. These platform builds only enable the tycho-platform-configuration environment that they're building. So at the end of this reactor each platform build machine has a P2 repo of the native fragments. We copy the windows fragment p2 repo to the linux machine, then build a profile that includes those platform-fragment p2 repos and the reactor has our shippable features and products. And this feature/product reactor has all tycho-platform-configuration environments enabled.
It means we're duplicating the compilation of the Java code on each platform but I couldn't see an easy way to avoid that.
-----Original Message-----
Sent: Wednesday, March 20, 2013 8:15 AM
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
Hello,
now I have switched to a feature based product, but now I am facing the same problem.
The platform-specific fragments are missing.
I had setted up the environments like described in my previous mail.
What is going wrong?
Cheers,
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
----------------------------------------------------------------------
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.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Justin Georgeson
2013-03-20 15:14:54 UTC
Permalink
The problem I ran into with specifying all the platform environments is that if I was on linux building a reactor which included the native fragment bundles it would fail on the windows fragments because the platform filter for those fragments (windows) didn't apply to the OS (linux).

-----Original Message-----
From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Christian Schulz
Sent: Wednesday, March 20, 2013 10:10 AM
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?

Hello Justin,

thanks for the explaination.
In my case the SWT fragments are missing.

The plugin based way was easy with including all plugins and relation to the os/ws.
But it isn't the recommened way. So I switched to the feature based product, because it should handle all on it own with a valid environment configuration in the pom.xml.
I have following configuration for the environments:

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver> <pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
...
</configuration>
</plugin>

I thought it is enough to define something like that and tycho will use the fragments, whcih are needed by the environment.
But it seems not to work.

In general I got some problems with the feature based product.
I got after successful build following exception:
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench"
could not be found in the registry

I had to include as dependency org.eclipse.ui.ide.application. I don't know why, but it works after it.

Perhaps I have something wrong in the tycho configuration or similar.

Cheers,

Chris
Post by Justin Georgeson
We have feature-based products with lots of native code to compile into fragments. Our aggregator has profiles like linux-repo and win-repo and the reactor includes all the plugins (host plugins, fragment plugins, test plugins) and a special platform-specific projects for a feature and a repository. These platform builds only enable the tycho-platform-configuration environment that they're building. So at the end of this reactor each platform build machine has a P2 repo of the native fragments. We copy the windows fragment p2 repo to the linux machine, then build a profile that includes those platform-fragment p2 repos and the reactor has our shippable features and products. And this feature/product reactor has all tycho-platform-configuration environments enabled.
It means we're duplicating the compilation of the Java code on each platform but I couldn't see an easy way to avoid that.
-----Original Message-----
Sent: Wednesday, March 20, 2013 8:15 AM
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
Hello,
now I have switched to a feature based product, but now I am facing the same problem.
The platform-specific fragments are missing.
I had setted up the environments like described in my previous mail.
What is going wrong?
Cheers,
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
----------------------------------------------------------------------
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.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christian Schulz
2013-03-20 15:22:49 UTC
Permalink
So in general it was a bad idea to switch to a feature based product? :/

How can I achieve to get the fragments packaged too?
At the moment I only see the possibility to switch back.
Perhaps I miss something out.
Post by Justin Georgeson
The problem I ran into with specifying all the platform environments is that if I was on linux building a reactor which included the native fragment bundles it would fail on the windows fragments because the platform filter for those fragments (windows) didn't apply to the OS (linux).
-----Original Message-----
Sent: Wednesday, March 20, 2013 10:10 AM
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
Hello Justin,
thanks for the explaination.
In my case the SWT fragments are missing.
The plugin based way was easy with including all plugins and relation to the os/ws.
But it isn't the recommened way. So I switched to the feature based product, because it should handle all on it own with a valid environment configuration in the pom.xml.
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver> <pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
...
</configuration>
</plugin>
I thought it is enough to define something like that and tycho will use the fragments, whcih are needed by the environment.
But it seems not to work.
In general I got some problems with the feature based product.
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench"
could not be found in the registry
I had to include as dependency org.eclipse.ui.ide.application. I don't know why, but it works after it.
Perhaps I have something wrong in the tycho configuration or similar.
Cheers,
Chris
Post by Justin Georgeson
We have feature-based products with lots of native code to compile into fragments. Our aggregator has profiles like linux-repo and win-repo and the reactor includes all the plugins (host plugins, fragment plugins, test plugins) and a special platform-specific projects for a feature and a repository. These platform builds only enable the tycho-platform-configuration environment that they're building. So at the end of this reactor each platform build machine has a P2 repo of the native fragments. We copy the windows fragment p2 repo to the linux machine, then build a profile that includes those platform-fragment p2 repos and the reactor has our shippable features and products. And this feature/product reactor has all tycho-platform-configuration environments enabled.
It means we're duplicating the compilation of the Java code on each platform but I couldn't see an easy way to avoid that.
-----Original Message-----
Sent: Wednesday, March 20, 2013 8:15 AM
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
Hello,
now I have switched to a feature based product, but now I am facing the same problem.
The platform-specific fragments are missing.
I had setted up the environments like described in my previous mail.
What is going wrong?
Cheers,
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
----------------------------------------------------------------------
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.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Justin Georgeson
2013-03-20 15:27:33 UTC
Permalink
I guess I don't know why listing features vs plugins in the product file makes a difference. As long as you have the native fragments for all platforms resolvable and have all the platform environments enabled, the feature should include all of them. The troubles I described were when building the native fragment plugins, not when building the features.

-----Original Message-----
From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Christian Schulz
Sent: Wednesday, March 20, 2013 10:23 AM
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?

So in general it was a bad idea to switch to a feature based product? :/

How can I achieve to get the fragments packaged too?
At the moment I only see the possibility to switch back.
Perhaps I miss something out.
Post by Justin Georgeson
The problem I ran into with specifying all the platform environments is that if I was on linux building a reactor which included the native fragment bundles it would fail on the windows fragments because the platform filter for those fragments (windows) didn't apply to the OS (linux).
-----Original Message-----
Sent: Wednesday, March 20, 2013 10:10 AM
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
Hello Justin,
thanks for the explaination.
In my case the SWT fragments are missing.
The plugin based way was easy with including all plugins and relation to the os/ws.
But it isn't the recommened way. So I switched to the feature based product, because it should handle all on it own with a valid environment configuration in the pom.xml.
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver> <pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
...
</configuration>
</plugin>
I thought it is enough to define something like that and tycho will use the fragments, whcih are needed by the environment.
But it seems not to work.
In general I got some problems with the feature based product.
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench"
could not be found in the registry
I had to include as dependency org.eclipse.ui.ide.application. I don't know why, but it works after it.
Perhaps I have something wrong in the tycho configuration or similar.
Cheers,
Chris
Post by Justin Georgeson
We have feature-based products with lots of native code to compile into fragments. Our aggregator has profiles like linux-repo and win-repo and the reactor includes all the plugins (host plugins, fragment plugins, test plugins) and a special platform-specific projects for a feature and a repository. These platform builds only enable the tycho-platform-configuration environment that they're building. So at the end of this reactor each platform build machine has a P2 repo of the native fragments. We copy the windows fragment p2 repo to the linux machine, then build a profile that includes those platform-fragment p2 repos and the reactor has our shippable features and products. And this feature/product reactor has all tycho-platform-configuration environments enabled.
It means we're duplicating the compilation of the Java code on each platform but I couldn't see an easy way to avoid that.
-----Original Message-----
Sent: Wednesday, March 20, 2013 8:15 AM
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
Hello,
now I have switched to a feature based product, but now I am facing the same problem.
The platform-specific fragments are missing.
I had setted up the environments like described in my previous mail.
What is going wrong?
Cheers,
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
---------------------------------------------------------------------
- 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.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christian Schulz
2013-03-20 15:36:04 UTC
Permalink
Hmm...

I hope Tobias Oberlies will read our messages. I have added his message.
Okay it seems that the plugin based product supports the behaviour I want.

@Tobias:
"Tycho no longer needs (and in fact ignores) the ws/os/arch attributes
in product files."
In my case I have to specify the attributes otherwise the fragments
aren't added. :/


Date: Mon, 18 Mar 2013 09:58:26 +0000
From: "Oberlies, Tobias"<***@sap.com>
To: Tycho user list<tycho-***@eclipse.org>
Subject: Re: [tycho-user] How to build plugin-based products with
platform-specific fragments?
Message-ID:
<***@DEWDFEMB14B.global.corp.sap>
Content-Type: text/plain; charset="iso-8859-1"

I just noticed that the FAQ you referred had two parts, and the second part has become obsolete: Sincehttps://bugs.eclipse.org/bugs/show_bug.cgi?id=342890 has been fixed, Tycho no longer needs (and in fact ignores) the ws/os/arch attributes in product files.

You obviously still need to specify the ws/os/arch you want to build for in the target-platform-configuration.

Now that this has been simplified, "How to build plugin-based products with platform-specific fragments" should no longer be an FAQ, so I deleted the entry from the FAQ wiki page.

Regards
Tobias
Post by Justin Georgeson
I guess I don't know why listing features vs plugins in the product file makes a difference. As long as you have the native fragments for all platforms resolvable and have all the platform environments enabled, the feature should include all of them. The troubles I described were when building the native fragment plugins, not when building the features.
-----Original Message-----
Sent: Wednesday, March 20, 2013 10:23 AM
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
So in general it was a bad idea to switch to a feature based product? :/
How can I achieve to get the fragments packaged too?
At the moment I only see the possibility to switch back.
Perhaps I miss something out.
Post by Justin Georgeson
The problem I ran into with specifying all the platform environments is that if I was on linux building a reactor which included the native fragment bundles it would fail on the windows fragments because the platform filter for those fragments (windows) didn't apply to the OS (linux).
-----Original Message-----
Sent: Wednesday, March 20, 2013 10:10 AM
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
Hello Justin,
thanks for the explaination.
In my case the SWT fragments are missing.
The plugin based way was easy with including all plugins and relation to the os/ws.
But it isn't the recommened way. So I switched to the feature based product, because it should handle all on it own with a valid environment configuration in the pom.xml.
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver> <pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
...
</configuration>
</plugin>
I thought it is enough to define something like that and tycho will use the fragments, whcih are needed by the environment.
But it seems not to work.
In general I got some problems with the feature based product.
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench"
could not be found in the registry
I had to include as dependency org.eclipse.ui.ide.application. I don't know why, but it works after it.
Perhaps I have something wrong in the tycho configuration or similar.
Cheers,
Chris
Post by Justin Georgeson
We have feature-based products with lots of native code to compile into fragments. Our aggregator has profiles like linux-repo and win-repo and the reactor includes all the plugins (host plugins, fragment plugins, test plugins) and a special platform-specific projects for a feature and a repository. These platform builds only enable the tycho-platform-configuration environment that they're building. So at the end of this reactor each platform build machine has a P2 repo of the native fragments. We copy the windows fragment p2 repo to the linux machine, then build a profile that includes those platform-fragment p2 repos and the reactor has our shippable features and products. And this feature/product reactor has all tycho-platform-configuration environments enabled.
It means we're duplicating the compilation of the Java code on each platform but I couldn't see an easy way to avoid that.
-----Original Message-----
Sent: Wednesday, March 20, 2013 8:15 AM
Subject: Re: [tycho-user] How to build plugin-based products with platform-specific fragments?
Hello,
now I have switched to a feature based product, but now I am facing the same problem.
The platform-specific fragments are missing.
I had setted up the environments like described in my previous mail.
What is going wrong?
Cheers,
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
---------------------------------------------------------------------
- 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.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christian Schulz
2013-03-20 16:45:06 UTC
Permalink
Tried it again, it doesn't work if I remove the fragment plugin.

If I am using the button add required plugins <plugin
id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
is always added.
Removing it doesn't include it in the build. Furthermore other os/archs
aren't build correctly too.
Placing the plugins like the following works:
<plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
<plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>

So the statement "Tycho no longer needs (and in fact ignores) the
ws/os/arch attributes in product files."
is correct but you need to put all fragments into the product configuration.

But I don't understand why the system can't use the environment
configurations.
In my opinion it would be a great update.
Post by Christian Schulz
Hmm...
I hope Tobias Oberlies will read our messages. I have added his message.
Okay it seems that the plugin based product supports the behaviour I want.
"Tycho no longer needs (and in fact ignores) the ws/os/arch attributes
in product files."
In my case I have to specify the attributes otherwise the fragments
aren't added. :/
Date: Mon, 18 Mar 2013 09:58:26 +0000
Subject: Re: [tycho-user] How to build plugin-based products with
platform-specific fragments?
Content-Type: text/plain; charset="iso-8859-1"
I just noticed that the FAQ you referred had two parts, and the second
Sincehttps://bugs.eclipse.org/bugs/show_bug.cgi?id=342890 has been
fixed, Tycho no longer needs (and in fact ignores) the ws/os/arch
attributes in product files.
You obviously still need to specify the ws/os/arch you want to build
for in the target-platform-configuration.
Now that this has been simplified, "How to build plugin-based products
with platform-specific fragments" should no longer be an FAQ, so I
deleted the entry from the FAQ wiki page.
Regards
Tobias
Post by Justin Georgeson
I guess I don't know why listing features vs plugins in the product
file makes a difference. As long as you have the native fragments for
all platforms resolvable and have all the platform environments
enabled, the feature should include all of them. The troubles I
described were when building the native fragment plugins, not when
building the features.
-----Original Message-----
Sent: Wednesday, March 20, 2013 10:23 AM
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with
platform-specific fragments?
So in general it was a bad idea to switch to a feature based product? :/
How can I achieve to get the fragments packaged too?
At the moment I only see the possibility to switch back.
Perhaps I miss something out.
Post by Justin Georgeson
The problem I ran into with specifying all the platform environments
is that if I was on linux building a reactor which included the
native fragment bundles it would fail on the windows fragments
because the platform filter for those fragments (windows) didn't
apply to the OS (linux).
-----Original Message-----
Sent: Wednesday, March 20, 2013 10:10 AM
To: Tycho user list
Subject: Re: [tycho-user] How to build plugin-based products with
platform-specific fragments?
Hello Justin,
thanks for the explaination.
In my case the SWT fragments are missing.
The plugin based way was easy with including all plugins and
relation to the os/ws.
But it isn't the recommened way. So I switched to the feature based
product, because it should handle all on it own with a valid
environment configuration in the pom.xml.
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
...
</configuration>
</plugin>
I thought it is enough to define something like that and tycho will
use the fragments, whcih are needed by the environment.
But it seems not to work.
In general I got some problems with the feature based product.
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench"
could not be found in the registry
I had to include as dependency org.eclipse.ui.ide.application. I
don't know why, but it works after it.
Perhaps I have something wrong in the tycho configuration or similar.
Cheers,
Chris
Post by Justin Georgeson
We have feature-based products with lots of native code to compile
into fragments. Our aggregator has profiles like linux-repo and
win-repo and the reactor includes all the plugins (host plugins,
fragment plugins, test plugins) and a special platform-specific
projects for a feature and a repository. These platform builds only
enable the tycho-platform-configuration environment that they're
building. So at the end of this reactor each platform build machine
has a P2 repo of the native fragments. We copy the windows fragment
p2 repo to the linux machine, then build a profile that includes
those platform-fragment p2 repos and the reactor has our shippable
features and products. And this feature/product reactor has all
tycho-platform-configuration environments enabled.
It means we're duplicating the compilation of the Java code on each
platform but I couldn't see an easy way to avoid that.
-----Original Message-----
Sent: Wednesday, March 20, 2013 8:15 AM
Subject: Re: [tycho-user] How to build plugin-based products with
platform-specific fragments?
Hello,
now I have switched to a feature based product, but now I am facing the same problem.
The platform-specific fragments are missing.
I had setted up the environments like described in my previous mail.
What is going wrong?
Cheers,
Chris
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
---------------------------------------------------------------------
- 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.
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Kai Zimmermann
2013-03-20 18:18:03 UTC
Permalink
Post by Christian Schulz
[...]
But I don't understand why the system can't use the environment
configurations.
In my opinion it would be a great update.
I think, at the moment, we have to sync our plugin fragments and the target
environment manually. If tycho could do that, that would be awesome.

Because the developer no longer need to check for which plugins there are
any platform specific fragments.
Christian Schulz
2013-03-20 20:42:11 UTC
Permalink
Post by Christian Schulz
[...]
But I don't understand why the system can't use the environment
configurations.
In my opinion it would be a great update.
I think, at the moment, we have to sync our plugin fragments and the
target environment manually. If tycho could do that, that would be
awesome.
Because the developer no longer need to check for which plugins there
are any platform specific fragments.
Yes of course it would be great to have something like that.
I would suggest it as feature request.

What is the opinion about that?
Kai Zimmermann
2013-03-21 06:44:07 UTC
Permalink
Post by Christian Schulz
[...]
But I don't understand why the system can't use the environment
configurations.
In my opinion it would be a great update.
I think, at the moment, we have to sync our plugin fragments and the
target environment manually. If tycho could do that, that would be awesome.

Because the developer no longer need to check for which plugins there are
any platform specific fragments.


Yes of course it would be great to have something like that.
I would suggest it as feature request.

What is the opinion about that?


It is a new feature of P2 on the first step, because the resolution should
be the same in all systems.
Kai Zimmermann
2013-03-21 07:01:31 UTC
Permalink
Post by Christian Schulz
[...]
But I don't understand why the system can't use the environment
configurations.
In my opinion it would be a great update.
I think, at the moment, we have to sync our plugin fragments and the
target environment manually. If tycho could do that, that would be awesome.

Because the developer no longer need to check for which plugins there are
any platform specific fragments.


Yes of course it would be great to have something like that.
I would suggest it as feature request.

What is the opinion about that?


But there are some problems like: when nobody references fragments, nobody
specifies a version number. That is not an good option for productive
environments.
Christian Schulz
2013-03-22 08:11:52 UTC
Permalink
Am 20.03.2013 um 21:42 schrieb Christian Schulz
Post by Christian Schulz
Post by Christian Schulz
[...]
But I don't understand why the system can't use the environment
configurations.
In my opinion it would be a great update.
I think, at the moment, we have to sync our plugin fragments and the
target environment manually. If tycho could do that, that would be awesome.
Because the developer no longer need to check for which plugins
there are any platform specific fragments.
Yes of course it would be great to have something like that.
I would suggest it as feature request.
What is the opinion about that?
But there are some problems like: when nobody references fragments,
nobody specifies a version number. That is not an good option for
productive environments.
I understand what you mean, but why you can't determine the fragments
based on the required plug-ins?
For swt I always need <plugin id="org.eclipse.swt"/>. There you can give
a version number, if you need.
Based on that version number and the target environments configured in
the pom.xml you can determine
which fragments are needed.
Oberlies, Tobias
2013-04-08 15:16:38 UTC
Permalink
Post by Christian Schulz
I understand what you mean, but why you can't determine the fragments
based on the required plug-ins?
For swt I always need <plugin id="org.eclipse.swt"/>. There you can give a
version number, if you need.
Based on that version number and the target environments configured in the
pom.xml you can determine
which fragments are needed.
Then Tycho would need a hard-coded map of environments (and possibly SWT versions) to SWT fragments, and maintain that list. This is just wrong.

The problem needs to be fixed on the SWT side. I had opened a bug for this [1] but it was blocked while there was nobody on the SWT project with enough knowledge of the build system to apply the patch. Maybe this has changed now that the Eclipse platform build has migrated to Tycho...

Regards
Tobias


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=361901

Continue reading on narkive:
Loading...