You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@codehaus.org> on 2014/06/27 21:34:10 UTC

[jira] (MNG-2933) Declaring the same resource dir in pom and overwriting it in a profile

     [ https://jira.codehaus.org/browse/MNG-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov updated MNG-2933:
--------------------------------

    Fix Version/s:     (was: 3.x / Backlog)

> Declaring the same resource dir in pom and overwriting it in a profile
> ----------------------------------------------------------------------
>
>                 Key: MNG-2933
>                 URL: https://jira.codehaus.org/browse/MNG-2933
>             Project: Maven
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.0.6
>            Reporter: Dirk Olmes
>            Priority: Minor
>
> I have a pom that declares a resource dir in the main section of the pom and a profile which re-declares the same resource dir in a profile, this time 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
> Running mvn -X with the profile activated shows that the same resource dir is added twice to the runtime model.
> I would have expected the profile to "overwrite" the resource directory as this is the behaviour for re-declaring dependencies in a profile over dependencies in the main section.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)