Bryan Headley <[EMAIL PROTECTED]> wrote:
> I like the default properties; I wouldn't use them as a
> counter-argument to my problem, but it's a nice feature.
OK.
> In terms of maintainability, here's a real trivial example from my
> "global parameter" file,
>
>
> product1.build.deployment.DEV.dir=${build.deployment.DEV.dir}/${product.prod
> uct1.dir}
[...]
> and then..
>
>
> product1.build.deployment.dir=${product1.build.deployment.${build.for}.dir}
> <!-- Assuming ${build.for} is either "DEV" or "QA" -->
>
> Here's the thing: If I state that the installation root directory,
> which is "/opt/aPath", is now changed to
> "/opt/weblogic/myProducts/aPath", I have to open several files (one
> for QA, DEV, PROD, maybe a deployment to NT) and ensure I have all
> these settings right.
I assume there is a property ${install.root.dir} that holds /opt/aPath
and your other properties like ${build.deployment.DEV.dir} use this
property, yes? So all you'd have to do is change this single
property. I'm probably missing something obvious, please forgive
me. 8-)
> Personally, what I am seeting is,
>
> product1.build.deployment.QA.dir
> -versus-
> product1.build.deployment.dir.QA
>
> The former promotes a property name within another property name,
> hence a need for a recursive parser. The other doesn't, perhaps at
> the cost of clarity.
I'd probably put the QA at the front of the property, but that's a
matter of taste - as well as whether one approach is clearer than the
other.
Thanks for your explanation
Stefan