ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@elastica.com
Subject RE: make -D in ant?
Date Thu, 02 Nov 2000 02:01:59 GMT
OK... what I was doing and what I was expecting to be able to do was this.

ant -DrootDir=C:\plymediadev 

and have a baseDir="${rootDir}"

I cannot do that. But as you suggest I can define baseDir from the
commandline so I'll do that which makes more sense anyway.

On Wed, 1 Nov 2000, Ventimiglia, David wrote:

> Then what is the meaning of this portion of the 1.2 documentation?
> 
> "...the base directory from which all path calculations are done. This
> attribute might be overridden by setting the "basedir" property on forehand.
> When this is done, it might be omitted in the project tag..."
> 
> Also, when I execute this,
> 
>   ant -Dbasedir=foo -debug classes
> 
> I get this included in the output,
> 
>   Setting ro project property: basedir -> foo
> 
> -----Original Message-----
> From: robert@elastica.com [mailto:robert@elastica.com]
> Sent: Wednesday, November 01, 2000 2:44 PM
> To: 'ant-user@jakarta.apache.org'
> Subject: RE: make -D in ant?
> 
> 
> Ant doesn't evaluate the -Dproperty from the commandline when setting the
> baseDir.
> 
> It sets the base dir to literally ${rootDir}
> 
> On Wed, 1 Nov 2000, Ventimiglia, David wrote:
> 
> > Maybe I'm missing something, but why doesn't ant -Dbasedir=C:\plymediadev
> > work?
> > 
> > -----Original Message-----
> > From: robert@elastica.com [mailto:robert@elastica.com]
> > Sent: Wednesday, November 01, 2000 11:04 AM
> > To: Samuel R Listopad II
> > Cc: ant-user@jakarta.apache.org; robert@elastica.com
> > Subject: RE: make -D in ant?
> > 
> > 
> > What can we expect? It would definately be nice to be able to pass in 
> > properties from the command line especially for baseDir or for that
> > matter anything else. I don't want to keep these references in the 
> > .xml file.
> > 
> > On Wed, 1 Nov 2000, Samuel R Listopad II wrote:
> > 
> > > > <project name="plymedia" basedir="${rootDir}">
> > > >
> > > > and
> > > >
> > > > ant -DrootDir=C:\plymediadev
> > > >
> > > > I want to hide all references to absolute paths outside of
> > > > the build file.
> > > >
> > > > when I do this it doesn't evaluate $rootDir as I would expect.
> > > 
> > > Ok this is what I was getting at with my last post (albeit poorly).  Ant
> > 1.2
> > > only seems
> > > to evaluate properties at creation time.  However I would propose a more
> > > dynamic system
> > > where properties were recursively evaluated whenever used.
> > > 
> > > i.e. in this case when ${basedir} used it would lookup basedir in the
> > hash,
> > > get the value
> > > of ${rootDir},  and the try to extract rootDir from the hashmap and find
> > > C:\plymediadev.
> > > 
> > > Its a simple change,  I was just wondering if it had already been
> thought
> > of
> > > and done/shot down
> > > for some glaring reason I could not see.
> > > 
> > > Sam
> > > 
> > 
> 


Mime
View raw message