On Tue, 21 Aug 2001, Jason van Zyl wrote:
> On 8/21/01 3:45 PM, "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > On 21 Aug 2001 [EMAIL PROTECTED] wrote:
> >
> >> jon 01/08/21 12:30:34
> >>
> >>
> >> <!-- ========== Initialize Properties
> >> ===================================== -->
> >>
> >> -
> >> + <property file="${user.home}/build.properties"/> <!-- User local
> >> -->
> >> <property file="build.properties"/> <!-- Component local
> >> -->
> >> <property file="../build.properties"/> <!-- Commons local
> >> -->
> >> - <property file="${user.home}/build.properties"/> <!-- User local
> >> -->
> >> -
> >
> > -1 ... the load from ${user.home}/build.properties should go *last*,
> > not *first*. You want to be able to set your "usual" properties in your
> > home directory, but override them for this particular package if
> > necessary.
>
> The way ant loads probably files is a bit strange. If you load
> ~/build.properties first any values set there will not be overriden by
> the subsequent loading of properties files defining properties already
> defined will be ignored. I believe it works in the reverse way you would
> expect it to.
The first definition of a property wins -- that is understood. Now, play
the following scenario (real life for me right now):
* In ${user.home}/build.properties, I've defined my "commons-foo.jar"
to point at the released version of the foo package, because that is
what I generally want to use in my builds.
* In building this particular component, I need to use hot-off-the-presses
CVS code because I use features added since the release, so I override
"commons-foo.jar" in my component-local version.
Using your ordering, my override does not take effect -- putting the "user
local" import third lets me do it.
Craig
>
> > The check-available stuff is a nice addition.
> >
> > Craig
>
> --
>
> jvz.
>
> Jason van Zyl
>
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
>
>
>