You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by santtarius <sa...@gmail.com> on 2013/11/14 16:50:34 UTC

Using filters based on environment.

Hi,

 In our project we have dev,qa and prod environment and we have filter
(property) file for each of these environments.I do understand that based on
the maven profile (for each of the environment ) we can apply/inject the
respective filter values into any configuration file.

Our problem is that,we have two different data centres in production.We use
same build (profile) for deploying in these two data centres.But we need
different configuration values for these two data centres within the
production environment. How can i use filter to achieve the same,or is there
any other way.

I created separate maven build profiles for these two data centres and
placed the respective filter inside this profile (in pom.xml) .But maven
throws a error when we place filter inside profile.Can some one please guide
me to acheive the same.


Regards
Santhosh kumar N



--
View this message in context: http://maven.40175.n5.nabble.com/Using-filters-based-on-environment-tp5775412.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: Using filters based on environment.

Posted by Anders Hammar <an...@hammar.net>.
You should handle the properties files outside of your binaries. Then you
don't need to play around with profiles.
Read properties files from the classpath. Most/all app servers provides
support for folders outside of the ear that are added to the classpath. Put
the properties files there.

/Anders (mobile)
Den 18 nov 2013 02:12 skrev "santtarius" <sa...@gmail.com>:

> Hi,
>
>  In our project we have dev,qa and prod environment and we have filter
> (property) file for each of these environments.I do understand that based
> on
> the maven profile (for each of the environment ) we can apply/inject the
> respective filter values into any configuration file.
>
> Our problem is that,we have two different data centres in production.We use
> same build (profile) for deploying in these two data centres.But we need
> different configuration values for these two data centres within the
> production environment. How can i use filter to achieve the same,or is
> there
> any other way.
>
> I created separate maven build profiles for these two data centres and
> placed the respective filter inside this profile (in pom.xml) .But maven
> throws a error when we place filter inside profile.Can some one please
> guide
> me to acheive the same.
>
>
> Regards
> Santhosh kumar N
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Using-filters-based-on-environment-tp5775412.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
>
>