maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nodje <>
Subject Re: How to override properties selectively with multiple filter files or profiles
Date Fri, 12 Sep 2008 12:17:31 GMT

I'm currently having the same problem as below. Not migrating from ant
though, but I need to be able to filter different set of properties having
the same name.

I don't think it's possible to affect a specific filter to a chosen

To illustrate, let's say you have two instances of an FTP module in your
main application.
These modules must be given a properties file for configuration. and Those two properties files hold the
exact same set of properties.
If one need to filter them, for say, different staging environment, one has
to find a trick. Unless I'm mistaken.

i'm about to code a complex system of prefix to be given to these set of
properties to be able to differentiate them. After some thinking, I'd rather
be able to affect a specific filter to a resource and be able to configure
multiple filters.

Is this already possible with Maven? Has anyone be confronted with that


Martin Buechler-3 wrote:
> Hello,
> I am still stuck with a mechanism, that  I used a lot when writing  
> build and deploy systems for many developers and configurations with  
> ant. The main goal here is to avoid redundancy when listing  
> configuration properties, using a default and then  
> selectively override special property setting for a developers  
> enviromnent or for the target systems. Example:
> build.xml:
> <propertyfile name="${}.properties"/>
> <propertyfile name="${hostname}.properties"/>
> <propertyfile name=""/>
> prop1=val1
> prop2=val2
> prop3=val3
> prop4=val4
> prop5=val5
> prop2=otherval
> prop5=otherval
> That way I never have to touch all existing properties, if I add a  
> new config value, i.e. to
> If I use profiles to modify the build element of the POM, I have to  
> inject a quite complete copy of the original build element. And, if I  
> try to list multiple filters int the filters element, the behaviour  
> is also not very obvious. Seems that only one of the  
> files is in effect.
> Is there a way to adjust properties non-redundant when using  
> profiles, or did I miss a maven feature, that does exactly that?
> Thank you for reading
> Martin
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Maven - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message