ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: nested property references
Date Wed, 02 May 2001 15:38:55 GMT
Peter Hayes <Peter.Hayes@fmr.com> wrote:

> I wrote a Property2 file that handles this because we need to use it
> in order to have only a single general build.xml file to build /
> package an arbitrary number of projects.

But your patch will only change the behavior for <property>'s value
attribute, all other property references wouldn't be affected.  I
think this is less than what has been asked for - but I don't think we
really have a technical problem here anyway.

> Here is an example of how we use it.  The label of a project jar is
> specified in a property file such as
> 
> -------- ../proj1/version.prop
> proj1.label=proj1-2.0.5_DEV
> --------
> 
> We invoke then invoke ant to build this project by
> 
> --------
> ant -Dproject.name=proj1
> --------
> 
> And our build.xml file uses the passed in property to get the
> correct label
> 
> -------- ../build.xml
>    <property2 name="jarFile" value="${${project.name}.label}.jar" />
> --------

If you do this, you are going to read ./${project.name}/version.prop
anyway, why can't you define jarFile in a project specific property
file as well?  What is the benefit of putting the definition of
jarFile into build.xml?

I'm really trying to understand this, so please help me 8-)

Stefan

Mime
View raw message