ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Rathnow <dave.rath...@wrx-ca.com>
Subject RE: Can properties be returned to a calling ant script?
Date Fri, 15 Nov 2002 15:54:39 GMT

The property file approach seems to be the most common.

However, I don't see how this will solve the problem
of location independence.  I need some way of finding the root
of our development tree.  If I use a property file, that means
I have to hard code the root location in a property, which
does not allow me to use both Unix and Windowz paths, nor
does it allow me to move the project around easily.

On unix the root could be /usr/local/DEV" while on Windowz
the root could be "E:/Dev".  It gets more complicated if I
have to checkout a code branch from CVS and put it under
"/usr/local/V3_5/DEV" and have all my projects build
correctly.

My thought was to have a single build script that new it's
location in the hiearchy and could find the root of
the develpment tree and define a property for all the other 
scripts to use. The property file will work for this.  Now
all I have to do is find out what task or combination of
tasks will give me root from the "common" build script.

Thanks
Dave.


> -----Original Message-----
> From: Jacob Kjome [mailto:hoju@visi.com]
> Sent: November 15, 2002 8:34 AM
> To: Ant Users List
> Subject: RE: Can properties be returned to a calling ant script?
> 
> 
> 
> Why don't you put all your common properties in a properties 
> file which is 
> included in all build scripts via:
> 
> <property file="my.properties"/>
> 
> Jake
> 
> At 08:21 AM 11/15/2002 -0700, you wrote:
> > > > 2. Can you have a called Ant script define properties which
> > > > can be picked up by the calling Ant script.
> > >
> > > Write them to a file that gets read back in by the parent build
> > > process.  Most of the time, you don't want to do this 8-)
> >
> >Okay, I'll bite.  Why isn't this a good idea?  I would like to have
> >a way that all common properties are set in a single build
> >script so I don't have to modify all my build scripts if changes
> >are made.   Can you suggest another method?
> >
> >Thanks,
> >Dave.
> >
> >--
> >To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message