You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dan Allen (JIRA)" <ji...@codehaus.org> on 2007/07/18 23:41:13 UTC

[jira] Commented: (MRESOURCES-24) Force overwrite resources defined in profiles

    [ http://jira.codehaus.org/browse/MRESOURCES-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102636 ] 

Dan Allen commented on MRESOURCES-24:
-------------------------------------

Let's see, how hard do you think it is to exclude one resource file when using a different profile? How much time do you have? You better have a couple of weeks.

Please, for the sake of every tortured maven user, let there be some way to say "I don't want this file on the classpath when I package." Need an example?

src/main/resources/META-INF/jboss-beans.xml is the configuration file for the jboss microcontainer. It must be on the classpath when deploying to any environment except JBoss. So in the jboss profile, I need to exclude it from the classpath when I build the war. However, the warSourceExclude only handles files in src/main/webapp, but the file I need to exclude is in src/main/resources.  Maven2 just says, "sorry, that is too hard for me to do."

> Force overwrite resources defined in profiles
> ---------------------------------------------
>
>                 Key: MRESOURCES-24
>                 URL: http://jira.codehaus.org/browse/MRESOURCES-24
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Kees de Kooter
>
> I am using profiles to package for different environments. The profile typically defines a couple of properties files with db and log settings.
> The resource plugin only overwrites files that are changed, so the profile specific resources with the same name are ignored and the wrong resources are packaged.
> I could do a clean first, but that seems a bit of a crude approach. 
> I would prefer to have a property like "overwrite=true" on a resource.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira