You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chad Woolley <li...@thewoolleyweb.com> on 2005/01/12 18:53:28 UTC
Dynamically building property names and retrieving their values
Hi,
I want each developer to be able to define their database settings for
each project in their <user.home>/build.properties, like this
projecta.db.info=projecta_db_info
projectb.db.info=projectb_db_info
However, I want to have a common set of db goals for all projects
(inherited from my parent project).
So, if I have the project name in a ${project.id} variable, can I
somehow dynamically retrieve the value of the property named
<project.id>.db.info?
Or, is there an easier way to do this?
Thanks,
Chad
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Dynamically building property names and retrieving their values
Posted by Dion Gillard <di...@gmail.com>.
${context.findVariable(project.id + '.db.info')}
On Wed, 12 Jan 2005 10:53:28 -0700, Chad Woolley
<li...@thewoolleyweb.com> wrote:
> Hi,
>
> I want each developer to be able to define their database settings for
> each project in their <user.home>/build.properties, like this
>
> projecta.db.info=projecta_db_info
> projectb.db.info=projectb_db_info
>
> However, I want to have a common set of db goals for all projects
> (inherited from my parent project).
>
> So, if I have the project name in a ${project.id} variable, can I
> somehow dynamically retrieve the value of the property named
> <project.id>.db.info?
>
> Or, is there an easier way to do this?
>
> Thanks,
> Chad
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
http://www.multitask.com.au/people/dion/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org