You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Mathias P.W Nilsson" <ma...@snyltarna.se> on 2009/02/20 10:18:09 UTC

Exclude properties in certain situations

Hi,

I'm using Spring, Eclipse and maven2 as build tool. In my development
environment I use a Spring property overrider to set certain properties for
my computer whereas my co-workers use their.

The problem is when we do mvn clean:clean install. The my.properties is
included and will of course override spring. If I alter the pom file 

<resource>
  <filtering>false</filtering>
  <directory>src/main/resources</directory>
    <excludes>
      <exclude>**/my.properties</exclude>
    </excludes>
</resource>

The war file will be ok but when deployed with eclipse on tomcat the
my.properties will be exluded. Is there a way to include, exclude this file
in certain situations. Is pretty annoing to go back and comment out lines in
the pom for deployment.
-- 
View this message in context: http://www.nabble.com/Exclude-properties-in-certain-situations-tp22117356p22117356.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Exclude properties in certain situations

Posted by Stefan Seidel <ss...@vub.de>.
Just use a profile[1]. There is tons of information & posts out there about the possibilities :)

Stefan
[1] http://maven.apache.org/pom.html#Profiles

On Fri, 20 Feb 2009 01:18:09 -0800 (PST)
"Mathias P.W Nilsson" <ma...@snyltarna.se> wrote:

> 
> Hi,
> 
> I'm using Spring, Eclipse and maven2 as build tool. In my development
> environment I use a Spring property overrider to set certain properties for
> my computer whereas my co-workers use their.
> 
> The problem is when we do mvn clean:clean install. The my.properties is
> included and will of course override spring. If I alter the pom file 
> 
> <resource>
>   <filtering>false</filtering>
>   <directory>src/main/resources</directory>
>     <excludes>
>       <exclude>**/my.properties</exclude>
>     </excludes>
> </resource>
> 
> The war file will be ok but when deployed with eclipse on tomcat the
> my.properties will be exluded. Is there a way to include, exclude this file
> in certain situations. Is pretty annoing to go back and comment out lines in
> the pom for deployment.


-- 
Mit freundlichen Grüßen,

Stefan Seidel
Software-Entwickler
________________________
VUB Printmedia GmbH
Chopinstraße 4, 04103 Leipzig
tel.    +49 (341) 9 60 50 93
fax.    +49 (341) 9 60 50 92
mail.   sseidel@vub.de 
web.    www.vub.de

HRB Köln 24015
UStID DE 122 649 251
GF Dr. Achim Preuss Neudorf,
Dr. Christian Preuss Neudorf

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