Good day to you, dir,

If you do this ( your pom resources setup without the profiles )

<project>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>...</exclude>
        </excludes>
      </resource>
    </resources>
  </build>
</project>

Maven resources plugin would copy everything from src/main/resources on one
pass, and will copy everything from src/main/resources except those you
specified in your excludes in the second. Hence, the end result is that
everything gets copied.

If you find this behaviour odd, please feel free to file a jira issue :-)

Cheers,
Franz


Dirk Olmes wrote:
> 
> Hi,
> 
> I have a pom that declares the resources in a build section and
> re-declares the same resource directory in a profile, albeit with
> excludes.
> 
> Example:
> 
> <project ...>
>   <build>
>     <resources>
>       <resource>
>         <directory>src/main/resources</directory>
>       </resource>
>     </resources>
>   </build>
> 
>   <profiles>
>     <profile>
>       <id...>
>       <build>
>         <resources>
>           <resource>
>             <directory>src/main/resources</directory>
>             <excludes>....</excludes>
>           </resource>
>         </resources>
>       </build>
>     </profile>
>   </profiles>
> </project
> 
> If I run help:effective-pom with the profile activated, I see the
> resource directory added twice: one time without the excludes and one
> time with the excludes. The resources plugin seems to pick up only the
> first entry, effectively ignoring the filter.
> 
> Am I the only one who thinks that this behaviour is unexpected at least?
> Should I file a Jira?
> 
> -dirk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-the-same-resource-dir-in-a-profile-ends-up-twice-in-the-effective-pom-tf3531428s177.html#a9856065
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