I’m not sure I fully follow what’s going on, however I’m not sure what you want 
to do can be easily done in a single reactor build.  It can possibly be done, 
but you’d need break things into a lot of modules.

My first question is are you building features that are OS specific or 
agnostic?  Are your plugin modules that are OS specific, are the essentially 
the same plugin with just native bits? i.e.
        Feature ABC (win32 & linux)
                - Plugin 123 (win32)
                - Plugin 123 (linux)

or is it:
        Feature ABC
                - Plugin 123 (win32)
                - Plugin 456 (linux)


I’m also not quite sure what you mean by OS flag… need more info, as it’s 
unclear as to what property you expect maven to respond.

FWIW: I’ve got an RCP project that I have targets of Windows, OS X, and Linux; 
which contains a mix of native and java code.

Albeit our project is rather large… it takes 3 hours to build the native 
artifacts alone. The process I follow is:

1. Reactor build for each of the native pieces, and then convert these to an 
artifact that can be installed.
2. Reactor build for the RCP app which depends upon the native artifacts of 
which I use the maven-dependency-plugin:unpack during the prepare-package phase 
to unpack the dependencies into the right location within the plugin.
        - each module handles all os platforms as needed - usually this is only 
needed in a packaging step; unless you have tests in platform independent code 
that depend upon the native bits.
        - ultimately what this means that the director plugin is going to 
create multiple output folders for each architecture; hence you need to know 
which native dependency needs to be placed where.

FWIW, I’ve never had any luck in building a single OS target at a time, mostly 
because the dependencies of the product include all OS’s (and there’s not an 
easy way to filter the .product file.)

The pattern that mine follows would be more like:

        Feature ABC
                - Plugin 123 (osx, win32, linux)
                - Plugin 456 (osx)
                - Plugin 789 (platform independent)


Also you might try the Tycho List (tycho-u...@eclipse.org 
<mailto:tycho-u...@eclipse.org>) as tycho does not exactly behave like normal 
maven in that it’s Manifest First vs POM First dependencies.  If you don’t have 
a good understanding of how that all works, you’ll have a really hard time 
getting multi-platform build with native elements working right.

- JK
                

> On Oct 13, 2016, at 4:18 AM, Rene Tassy <rene.ta...@telit.com> wrote:
> 
> Hi
>  
> I am currently developing an eclipse RCP application and one of my features 
> includes a few platform specific plugins.
> In other words some of those plugins have o/s flag equal to “win32” and some 
> others “linux”.
>  
> Having this flag breaks my maven build because when building the feature on 
> windows it cannot see the linux plugins and vice-versa.
> Is there something I can specify in my pom.xml so that the RCP o/s flag is 
> picked by maven ?
>  
> Here is how my pom.xml looks like : 
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> <http://maven.apache.org/POM/4.0.0> 
> http://maven.apache.org/xsd/maven-4.0.0.xsd 
> <http://maven.apache.org/xsd/maven-4.0.0.xsd>" 
> xmlns="http://maven.apache.org/POM/4.0.0 <http://maven.apache.org/POM/4.0.0>"
>                                 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
> <http://www.w3.org/2001/XMLSchema-instance>">
>                 <modelVersion>4.0.0</modelVersion>
>                 <groupId>group_id </groupId>
>                 <artifactId>artifact_id</artifactId>
>                 <version>0.0.1-SNAPSHOT</version>
>                 <packaging>pom</packaging>
>  
>                 <properties>
>                     
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>                 </properties>
>  
>                 <repositories>
>                                 <repository>
>                                                 <id>mars</id>
>                                                 <layout>p2</layout>
>                                                 
> <url>http://download.eclipse.org/releases/mars</url> 
> <http://download.eclipse.org/releases/mars%3C/url%3E>
>                                 </repository>
>  
>                                 <repository>
>                                                 <id>eclipse-cdt</id>
>                                                 
> <url>http://download.eclipse.org/tools/cdt/builds/luna/milestones/</url> 
> <http://download.eclipse.org/tools/cdt/builds/luna/milestones/%3C/url%3E>
>                                                 <layout>p2</layout>
>                                 </repository>
>  
>                                 <repository>
>                                                 <id>eclipse-pydev</id>
>                                                 
> <url>https://dl.bintray.com/fabioz/pydev/4.5.0</url> 
> <https://dl.bintray.com/fabioz/pydev/4.5.0%3C/url%3E>
>                                                 <layout>p2</layout>
>                                 </repository>
>  
>                 </repositories>
>                 <modules>
>                                 <module> feature1  </module>
>                                 <module> plugin1 of feature1 with windows o/s 
> flag  </module>
>                                 <module> plugin2 of feature1 with linux o/s 
> flag  </module>
>  
>                 </modules>
>                 <build>
>                                 <plugins>
>                                                 <plugin>
>                                                                 
> <groupId>org.eclipse.tycho</groupId>
>                                                                 
> <artifactId>tycho-maven-plugin</artifactId>
>                                                                 
> <version>0.24.0</version>
>                                                                 
> <extensions>true</extensions>
>                                                 </plugin>
>  
>                                                 <plugin>
>                                                                 
> <groupId>org.eclipse.tycho</groupId>
>                                                                 
> <artifactId>target-platform-configuration</artifactId>
>                                                                 
> <version>0.24.0</version>
>                                                                 
> <configuration>
>                                                                 
> <resolver>p2</resolver>
>                                                                 <environments>
>                                                                     
> <environment>
>                                                                               
>   <os>linux</os>
>                                                                               
>   <ws>gtk</ws>
>                                                                               
>   <arch>x86_64</arch>
>                                                                     
> </environment>
>                                                                     
> <environment>
>                                                                               
>   <os>linux</os>
>                                                                               
>   <ws>gtk</ws>
>                                                                               
>   <arch>x86</arch>
>                                                                     
> </environment>
>                                             <environment>
>                                                                               
>   <os>win32</os>
>                                                                               
>   <ws>win32</ws>
>                                                                               
>   <arch>x86_64</arch>
>                                                                     
> </environment>
>                                                                     
> <environment>
>                                                                               
>   <os>win32</os>
>                                                                               
>   <ws>win32</ws>
>                                                                               
>   <arch>x86</arch>
>                                                                     
> </environment>
>                                                                 
> </environments>
>                                                                 
> </configuration>
>                                         </plugin>
>                                 </plugins>
>                 </build>
> </project>
>  
> Thanks in advance,
> Rene
>  
> Rene Tassy 
> SW Engineer, Application Engineering 
> rene.ta...@telit.com <mailto:rene.ta...@telit.com>
> www.telit.com <http://www.telit.com/> 
>         
>  
> <http://robustus.impactia.com/AnalyticServer/redirect?cid=15fbbe1bb7e142c9&mid=81604617&eurl=aHR0cDovL3d3dy55b3V0dWJlLmNvbS90ZWxpdGNvbW11bmljYXRpb25z&istmp=enr...@telit.com>
>          
> <http://robustus.impactia.com/AnalyticServer/redirect?cid=15fbbe1bb7e142c9&mid=81604617&eurl=aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20vK3RlbGl0&istmp=enr...@telit.com>
>    
> <http://robustus.impactia.com/AnalyticServer/redirect?cid=15fbbe1bb7e142c9&mid=81604617&eurl=aHR0cHM6Ly90d2l0dGVyLmNvbS9UZWxpdF9XU19jb3Jw&istmp=enr...@telit.com>
>        
> <http://robustus.impactia.com/AnalyticServer/redirect?cid=15fbbe1bb7e142c9&mid=81604617&eurl=aHR0cDovL2ZhY2Vib29rLmNvbS90ZWxpdHdpcmVsZXNz&istmp=enr...@telit.com>
>        
> <http://robustus.impactia.com/AnalyticServer/redirect?cid=15fbbe1bb7e142c9&mid=81604617&eurl=aHR0cDovL3d3dy5saW5rZWRpbi5jb20vY29tcGFueS90ZWxpdC13aXJlbGVzcy1zb2x1dGlvbnM=&istmp=enr...@telit.com>
> 
> 
> This electronic message, including attachments, is intended only for the use 
> of the individual or company named above or to which it is addressed.
>  The information contained in this message shall be considered confidential 
> and proprietary, and may include confidential work product. If you are not 
> the intended recipient, please be aware that any unauthorized use,
>  dissemination, distribution or copying of this message is strictly 
> prohibited. If you have received this email in error, please notify the 
> sender by replying to this message and deleting this email immediately. 
> 
> To the extent this email includes an offer to buy Telit products or an order 
> confirmation, the offer or order confirmation is governed by Telit’s General 
> Terms and Conditions of Sale, which are published here 
> <http://www.telit.com/terms-and-conditions/>.
> 


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to