You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Goetze <ch...@sensage.com> on 2006/12/05 19:23:22 UTC

Merging vs Overriding Settings?

I'm not clear on the algorithm used for inheritance of pom settings.

It would seem that some settings are merged (obvious example: 
dependencies), whereas others seem to override. Is there any consistent 
rule about this or is it just whatever was deemed appropriate by 
whomever writing that section?

For example, I would like to be able to do this, but it doesn't seem to 
work:

In the parent pom.xml:

..
  <build>

   <!-- Always exclude this file -->
   <resources>
    <resource>
     <excludes>
      <exclude>**/.cook.fp</exclude>
     </excludes>
    </resource>
   </resources>

In the module pom.xml:

  <build>

   <!-- Cause resource filtering -->
   <resources>
    <resource>
     <directory>src/main/assembly</directory>
     <filtering>true</filtering>
    </resource>
   </resources>

And I would like to end up with the effective pom of:

  <build>

   <!-- Cause resource filtering -->
   <resources>
    <resource>
     <directory>src/main/assembly</directory>
     <filtering>true</filtering>
     <excludes>
      <exclude>**/.cook.fp</exclude>
     </excludes>
    </resource>
   </resources>

but I don't, instead the module setting replaces the parent setting.
--
cg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org