> -----Original Message-----
> From: Jason van Zyl [mailto:[EMAIL PROTECTED]
> Sent: 15 June 2004 11:02
> To: Maven Developers List
> Subject: Re: project build.properties not overriding user
> build.properties?
> 
> On Tue, 2004-06-15 at 01:37, Vincent Massol wrote:
> > Hi,
> >
> > Looking at Maven source it seems to me that any property defined in
a
> > project's build.properties would override that same property defined
in
> > the user.home build.properties (and that seems logical to me).
However
> > this is not happening.
> 
> The ~/build.properties has always had the final say and overrides
> anything defined in any of the other properties files. The relevant
> snippet of code is:
> 
> Map result = MavenUtils.mergeMaps( new Map[]
>         {
>             systemProperties,
>             userBuildProperties,
>             projectBuildProperties,
>             projectProperties,
>             driverProperties
>         } );
> 

yes, that's the code I was looking at but I read it the other way around
(I've now read the mergeMaps() algorithm and I can see that it will not
override existing key:value pairs).

> 
> Order of precedence is from the top of the list to the bottom. This
has
> always been the way the properties have worked.

Ok. I personally never use a master build.properties but they do on the
project I'm currently working on. I find it strange that something
global overrides something local. It means I cannot have default
behaviors that can be overridden. Anything that is not 100% common will
have to be spread in the different projects. 

Anyway I guess I'm too used to the other way of thinking...

The hard part is that with this philosophy a project has to be aware of
all the other maven projects running on that machine. It cannot
self-defined some properties that will work under any conditions.

Anyway, now I understand how it works I can find workarounds :-)

Thanks
-Vincent

> 
> >
> > Is that a wanted behavior?
> >
> > Thanks
> > -Vincent
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> jvz.
> 
> Jason van Zyl
> [EMAIL PROTECTED]
> http://maven.apache.org
> 
> happiness is like a butterfly: the more you chase it, the more it will
> elude you, but if you turn your attention to other things, it will
come
> and sit softly on your shoulder ...
> 
>  -- Thoreau
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to