Jörg Schaible-3 wrote:
> 
> The point is that it is platform dependent - the platform your developer
> is 
> using. A profile should not be used to define dependencies - at least if 
> those should be transitively inherited. It simply does not work in the way 
> most people assume. It is not inherited anyway, therefore you have to
> define 
> it already twice (in A and B). This does not scale also.
> 
> What you might try is to define a swt pom (or package type pom) for all 
> platforms like:
> 
> ...
>   <groupId>com.eclipse</groupId>
>   <artifactId>swt-generic</artifactId>
>   <version>3.6.1</version>
>   <packaging>pom</packaging>
> 
>   <profiles>
>     <profile>
>       <id>win32</id>
>       <dependencies>
>         <groupId>com.eclipse</groupId>
>         <artifactId>swt</artifactId>
>         <version>3.6.1</version>
>         <classifier>win32-x86</classifier>
>       </dependencies>
>     </profile>
>     ...
>   </profiles>
> 
> and refer that everywhere you need it as provided:
> 
> ..
>     <dependency>
>       <groupId>com.eclipse</groupId>
>       <artifactId>swt-generic</artifactId>
>       <version>3.6.1</version>
>       <type>pom</type>
>       <scope>provided</scope>
>     </dependency>
> ..
> 
> Your developers may actually set their default in the settings.xml:
> 
>   <activeProfiles>
>     <activeProfile>win32</activeProfile>
>     ...
>   </activeProfiles>
>   <profiles>
>     <profile>
>       <id>win32</id>
>     </profile>
>     ...
>   </profiles>
> 
> The provided scope prevents that a special one is taken and you have to 
> select the appropriate one(s) when packaging your app e.g. with the
> assembly 
> plugin.
> 

Hi Jörg,

I followed your instructions but I don't understand how:

  <activeProfiles>
    <activeProfile>win32</activeProfile>
    ...
  </activeProfiles>
  <profiles>
    <profile>
      <id>win32</id>
    </profile>
    ...
  </profiles>

leads to the inclusion of the Windows-specific SWT library. It doesn't seem
to activate the "win32" profile in the SWT project. Any ideas?

Gili
-- 
View this message in context: 
http://maven.40175.n5.nabble.com/POM-inheritance-breaks-build-tp3263869p3309523.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to