ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hayes, Peter" <>
Subject RE: nested property references
Date Wed, 02 May 2001 16:05:01 GMT
I did not mention it but I actually added a fileset feature to the property
taskdef so that I can read in arbitrary prop files without specifying them
directly.  This way we can add a new project w/o changing any code in the
build.xml file.

<property2 srcdir="${basedir}" includes="*/version.prop" />

Since one project may reference another project, it is necessary to specify
names of jar files specific to a project.  So in a project property file we
would have the following as the classpath

------ ../<project>/build.prop

The common.label is defined in the common project's version.prop that has
been loaded by the earlier call of property2.

Basically we want to allow our developers to create new projects that have
only a version.prop to name the jar files and create labels in clearcase and
the build.prop file that has compiles, resources, runnable targets,
classpath jars properties.


-----Original Message-----
From: Stefan Bodewig []
Sent: Wednesday, May 02, 2001 11:39 AM
Subject: Re: nested property references

Peter Hayes <> 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
> --------
> And our build.xml file uses the passed in property to get the
> correct label
> -------- ../build.xml
>    <property2 name="jarFile" value="${${}.label}.jar" />
> --------

If you do this, you are going to read ./${}/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-)


View raw message