You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Stephen McConnell <mc...@apache.org> on 2003/11/24 22:43:00 UTC
[avalon-defaults] .... problem with env resolution
I've just finshed making some changes to the defaults package to handle
symbol substitution where ${xxx} occupies only a part of a property
value. This means that you can now declare properties that reference
other properties as part of their defintion.
Ok, that's all looking good. But I'm running into a problem with
respect to the way I'm resolving the ultimate property value when
so,mething is declared as a environment variable. For example
MERLIN_HOME translates to ${merlin.home), however, I'm loosing the
MERLIN_HOME value and getting the static parameterized value instead
(see listing below).
Alex ... help!
The source code that is handling this is in avalon-dandbox/kernel/impl
.... DefaultCriteria.
Aside from this one issue - the defaults stuff looks like really
valuable content.
Here is a listing of relavant propery sets (excluding sys properties) as
I'm moving though the default resolution process. At this time I have
zero app specific code handling specific properties with the single
exception of the translation of env variables like MERLIN_HOME to
${merlin.home). This is just *so* much metter!
Cheers, Steve.
------------ AVALON--------------------------
${avalon.home} == ${user.home}/.avalon
------------ MERIN---------------------------
${merlin.config} == ${merlin.home}/config
${merlin.server} == true
${merlin.kernel} == ${merlin.config}/kernel.xml
${merlin.home} == ${user.home}/.merlin
${merlin.ext} == ${merlin.dir}/ext
${merlin.dir} == ${user.dir}
${merlin.context} == ${merlin.dir}/home
${merlin.debug} == false
${merlin.info} == false
${merlin.system} == ${merlin.home}/system
------------ ENVIRONMENT---------------------
${maven.home} == F:\system\maven
${maven.home.local} == F:\system\maven
${merlin.home} == C:\merlin
------------ DEFAULTS (UNRESOLVED)-----------
${merlin.config} == ${merlin.home}/config
${merlin.server} == true
${merlin.kernel} == ${merlin.config}/kernel.xml
${avalon.home} == ${user.home}/.avalon
${merlin.home} == ${user.home}/.merlin
${merlin.ext} == ${merlin.dir}/ext
${merlin.dir} == ${user.dir}
${merlin.context} == ${merlin.dir}/home
${merlin.debug} == false
${merlin.info} == false
${merlin.system} == ${merlin.home}/system
------------ DEFAULTS (RESOLVED)-------------
${merlin.config} == C:\WINNT\Profiles\mcconnell/.merlin/config
${merlin.server} == true
${merlin.kernel} == C:\WINNT\Profiles\mcconnell/.merlin/config/kernel.xml
${avalon.home} == C:\WINNT\Profiles\mcconnell/.avalon
${merlin.home} == C:\WINNT\Profiles\mcconnell/.merlin
${merlin.ext} == F:\dev\avalon-sandbox\kernel/ext
${merlin.dir} == F:\dev\avalon-sandbox\kernel
${merlin.context} == F:\dev\avalon-sandbox\kernel/home
${merlin.debug} == false
${merlin.info} == false
${merlin.system} == C:\WINNT\Profiles\mcconnell/.merlin/system
--
Stephen J. McConnell
mailto:mcconnell@apache.org
|------------------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org/merlin |
| http://dpml.net/ |
|------------------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: [avalon-defaults] .... problem with env resolution
Posted by Stephen McConnell <mc...@apache.org>.
But wait - I spoke too soon!
A little bit of tweaking with the ordering of the instances of
Properties supplied to the SimpleDefaultsFinder and now I have:
------------ DEFAULTS (RESOLVED)-------------
${merlin.config} == C:\merlin/config
${merlin.server} == true
${merlin.kernel} == C:\merlin/config/kernel.xml
${avalon.home} == C:\WINNT\Profiles\mcconnell/.avalon
${merlin.home} == C:\merlin
${merlin.ext} == F:\dev\avalon-sandbox\kernel/ext
${merlin.dir} == F:\dev\avalon-sandbox\kernel
${merlin.context} == F:\dev\avalon-sandbox\kernel/home
${merlin.debug} == false
${merlin.info} == false
${merlin.system} == C:\merlin/system
And it's perfect!
Stephen.
Stephen McConnell wrote:
>
> I've just finshed making some changes to the defaults package to
> handle symbol substitution where ${xxx} occupies only a part of a
> property value. This means that you can now declare properties that
> reference other properties as part of their defintion.
>
> Ok, that's all looking good. But I'm running into a problem with
> respect to the way I'm resolving the ultimate property value when
> so,mething is declared as a environment variable. For example
> MERLIN_HOME translates to ${merlin.home), however, I'm loosing the
> MERLIN_HOME value and getting the static parameterized value instead
> (see listing below).
>
> Alex ... help!
>
> The source code that is handling this is in avalon-dandbox/kernel/impl
> .... DefaultCriteria.
>
> Aside from this one issue - the defaults stuff looks like really
> valuable content.
>
> Here is a listing of relavant propery sets (excluding sys properties)
> as I'm moving though the default resolution process. At this time I
> have zero app specific code handling specific properties with the
> single exception of the translation of env variables like MERLIN_HOME
> to ${merlin.home). This is just *so* much metter!
>
> Cheers, Steve.
>
> ------------ AVALON--------------------------
>
> ${avalon.home} == ${user.home}/.avalon
>
> ------------ MERIN---------------------------
>
> ${merlin.config} == ${merlin.home}/config
> ${merlin.server} == true
> ${merlin.kernel} == ${merlin.config}/kernel.xml
> ${merlin.home} == ${user.home}/.merlin
> ${merlin.ext} == ${merlin.dir}/ext
> ${merlin.dir} == ${user.dir}
> ${merlin.context} == ${merlin.dir}/home
> ${merlin.debug} == false
> ${merlin.info} == false
> ${merlin.system} == ${merlin.home}/system
>
> ------------ ENVIRONMENT---------------------
>
> ${maven.home} == F:\system\maven
> ${maven.home.local} == F:\system\maven
> ${merlin.home} == C:\merlin
>
> ------------ DEFAULTS (UNRESOLVED)-----------
>
> ${merlin.config} == ${merlin.home}/config
> ${merlin.server} == true
> ${merlin.kernel} == ${merlin.config}/kernel.xml
> ${avalon.home} == ${user.home}/.avalon
> ${merlin.home} == ${user.home}/.merlin
> ${merlin.ext} == ${merlin.dir}/ext
> ${merlin.dir} == ${user.dir}
> ${merlin.context} == ${merlin.dir}/home
> ${merlin.debug} == false
> ${merlin.info} == false
> ${merlin.system} == ${merlin.home}/system
>
> ------------ DEFAULTS (RESOLVED)-------------
>
> ${merlin.config} == C:\WINNT\Profiles\mcconnell/.merlin/config
> ${merlin.server} == true
> ${merlin.kernel} ==
> C:\WINNT\Profiles\mcconnell/.merlin/config/kernel.xml
> ${avalon.home} == C:\WINNT\Profiles\mcconnell/.avalon
> ${merlin.home} == C:\WINNT\Profiles\mcconnell/.merlin
> ${merlin.ext} == F:\dev\avalon-sandbox\kernel/ext
> ${merlin.dir} == F:\dev\avalon-sandbox\kernel
> ${merlin.context} == F:\dev\avalon-sandbox\kernel/home
> ${merlin.debug} == false
> ${merlin.info} == false
> ${merlin.system} == C:\WINNT\Profiles\mcconnell/.merlin/system
>
--
Stephen J. McConnell
mailto:mcconnell@apache.org
|------------------------------------------------|
| Magic by Merlin |
| Production by Avalon |
| |
| http://avalon.apache.org/merlin |
| http://dpml.net/ |
|------------------------------------------------|
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org