Create feature projects to include all those plugins with the os/arc/ws attributes, then in the product include the features instead of the plugins. Then build
 the features and product together with the profile for the individual platform. 
  
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx]
On Behalf Of Jim Klo 
Sent: Thursday, April 30, 2015 11:30 AM 
To: Tycho user list 
Subject: [EXTERNAL] Re: [tycho-user] Building 1 Environment instead of all 
 
 
  
Hi Martin, 
Thanks, but I’m aware of profiles - and they are certainly part of the solution - but not the entirety. 
 
The key to my problem is that within our “application.product” file we list dependencies such as this: 
 
      <plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/> 
 
      <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/> 
 
      <plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/> 
 
      <plugin id="org.eclipse.core.net.linux.x86_64" fragment="true"/> 
 
      <plugin id="org.eclipse.core.net.win32.x86_64" fragment="true"/> 
 
      <plugin id="org.eclipse.core.resources"/> 
 
      <plugin id="org.eclipse.core.resources.win32.x86_64" fragment="true"/> 
 
      <plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa" fragment="true"/> 
 
      <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/> 
 
      <plugin id="org.eclipse.equinox.security.win32.x86_64" fragment="true"/> 
 
      <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/> 
 
      <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/> 
 
      <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/> 
 
 
When using profiles to enable or disable specific targets, say I only want to build “macosx”, Maven/Tycho complains in that it cannot resolve the above linux and win32 plugin dependencies. Hence when a specific profile is active, how do
 I change the way the “product” file is parsed? 
 
I’m open to other ways of dealing with the plugin dependencies in the .product file - but that’s the missing documentation I’m not finding. Unfortunately profiles alone doesn’t solve this. 
 
  
  
Hi Jim, 
 
you can achieve that by using maven profiles [1]. 
Create different profiles for the different target environments and run Tycho with the profile setting you want to build. 
With the following profile settings you can run mvn clean install -P linux to build your product for linux, -P win32 for win32 and -P linux,win32 for both. 
You might also want to enable all the profiles per default to build for all platforms by default. 
 
<profile> 
 <id>linux</id> 
 <build> 
 <plugins> 
   <plugin> 
     <groupId>org.eclipse.tycho</groupId> 
     <artifactId>target-platform-configuration</artifactId> 
     <version>${tycho-version}</version> 
     <configuration> 
       <environments> 
         <environment> 
           <os>linux</os> 
           <ws>gtk</ws> 
           <arch>x86_64</arch> 
          </environment> 
       </environments> 
     </configuration> 
   </plugin> 
 </plugins> 
</profile> 
<profile> 
 <id>win32</id> 
 <build> 
 <plugins> 
   <plugin> 
     <groupId>org.eclipse.tycho</groupId> 
     <artifactId>target-platform-configuration</artifactId> 
     <version>${tycho-version}</version> 
     <configuration> 
       <environments> 
         <environment> 
           <os>win32</os> 
           <ws>win32</ws> 
           <arch>x86</arch> 
          </environment> 
       </environments> 
     </configuration> 
   </plugin> 
 </plugins> 
</profile> 
 
[1] 
http://maven.apache.org/guides/introduction/introduction-to-profiles.html 
 
 
Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Jim Klo 
Gesendet: Mittwoch, 29. April 2015 22:19 
An: Tycho user list 
Betreff: [tycho-user] Building 1 Environment instead of all 
 
Greetings we are building an RCP application that is currently building with Tycho.  Our CI builds for x64 builds for window, mac, and linux. 
 
Our .product file has several native fragment dependencies [ org.eclipse.core.(resources|filesystem|net).(linux|macosx|win32).x84_64 ]. 
 
If I omit one of the environments from the target-platform-configuration, the build fails because it cannot find one of the dependencies listed in the .product file. 
 
Is there a way to just tell tycho to only build and assemble one of the target environments instead of all of them? 
 
Thanks, 
 
- Jim 
 
 
Jim Klo 
Senior Software Engineer 
Center for Software Engineering 
SRI International 
t.        @nsomnac 
 
_______________________________________________ 
tycho-user mailing list 
tycho-user@xxxxxxxxxxx 
To change your delivery options, retrieve your password, or unsubscribe from this list, visit 
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. 
 |