Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Multiple target platform configuration based on profiles

Hi,

Am Mon, 21 Jan 2019 16:13:04 +0000 schrieb Sasidharan Nirmal
(CAP-SST/ESM1):

> Hello,
> 
> We want to control the target platform configuration based on profiles.
> This is somehow not working as the plugin configurations are not getting
> merged.
> 
> We have the following two profiles:
> 
> [code]
> <profile>
>             <id>LinuxProduct</id> <activation>
>                 <activeByDefault>false</activeByDefault>
>             </activation>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.eclipse.tycho</groupId>
>                         <artifactId>target-platform-configuration</
artifactId>
>                         <configuration>
>                             <environments>
>                                 <environment>
>                                     <os>linux</os> <ws>gtk</ws>
>                                     <arch>x86_64</arch>
>                                 </environment>
>                             </environments>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
> [/code]
> 
> and
> 
> [code]
>          <profile>
>             <id>WindowsProduct</id>
>             <activation>
>                 <activeByDefault>true</activeByDefault>
>            </activation>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.eclipse.tycho</groupId>
>                         <artifactId>target-platform-configuration</
artifactId>
>                         <configuration>
>                             <environments>
>                                 <environment>
>                                     <os>win32</os> <ws>win32</ws>
>                                     <arch>x86_64</arch>
>                                  </environment>
>                              </environments>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>          </profile>
> [/code]
> 
> The expectation was that when we run [code]maven clean package
> -PWindowsProduct, LinuxProduct[/code]
> both configurations are merged (and both products are build in the end
> for both platforms).
> 
> Currently it builds only the "WindowsProduct". We checked the active
> profiles with "mvn
> org.apache.maven.plugins:maven-help-plugin:3.1.1:active-profiles -P
> WindowsProduct, LinuxProduct" and found that both profiles are active.
> 
> Using combine.self="override" or combine.self="append" also doesn't help
> as it is not a parent-child POM relation.
>
> Any ideas on how to fix this or another idea on how to create products
> based on profile?

It is combine.children="append" and it works if you add it to 
"environments". Those attributes define the merge operation for multiple 
declared configuration elements for the same goals - it does not matter 
whether the multiple declaration is a result of parent-child relation or 
of different profiles.

Cheers,
Jörg



Back to the top