ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: variable inside a variable
Date Mon, 19 Jan 2004 07:11:21 GMT
AntContrib: <propertycopy>

or inside a properties file:


database.type=mysql
database.jar=${database.type}.jar



Jan



> -----Original Message-----
> From: Matt Raible [mailto:lists@raibledesigns.com]
> Sent: Friday, January 16, 2004 9:26 PM
> To: user@ant.apache.org
> Subject: variable inside a variable
> 
> 
> I have a lib.properties file that defines all my dependencies for my 
> project.  In it, I define my JDBC drivers with syntax as follows:
> 
> #
> # MySQL - http://www.mysql.com/
> #
> mysql.version            = 3.0.9-stable
> mysql.dir=${lib.dir}/mysql-connector-java-${mysql.version}
> mysql.jar=${mysql.dir}/mysql-connector-java-${mysql.version}-bin.jar
> 
> Then I used a database.jar variable that refers to the database I'm 
> using:
> 
> <property name="database.jar" location="${mysql.jar}"/>
> 
> What I'd like to do is just specify a database.type property that 
> equals "mysql" and then feed it into the database.jar property.  Is 
> this possible?
> 
> Thanks,
> 
> Matt
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message