ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: Driver Attribute of SQL Task should not be required
Date Fri, 31 May 2002 20:08:29 GMT

----- Original Message -----
From: "Scott Ellsworth" <scott@alodar.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, May 31, 2002 12:22 PM
Subject: Re: Driver Attribute of SQL Task should not be required


>
> On Friday, May 31, 2002, at 10:51  AM, Steve Loughran wrote:
>
> > ----- Original Message -----
> > From: "Christian Wolfgang Hujer" <Christian.Hujer@itcqis.com>
> > To: <ant-user@jakarta.apache.org>
> >
> >
> >> I think the driver attribute of the SQL task should be optional, not
> >> required.  It is possible to load a JDBC Driver using the
> >> -Djdbc.drivers property,
> >
> > we are trying to move away from all the magic properties, so no, I
> > think it should stay as an attribute. Also, in my experience, the
> > driver is often application dependent, so that I have different drivers
> > for each app and the db they talk to.
>
> The nice thing about having it be a property is that you can always grab
> an environment variable to fill out that property within ant, and
> depending on how you write your build.xml, the environment can either
> override or be overridden by properties specified by the user.
>
> <property file="user.properties">
> <property environment="env">
> jdbc.drivers = env.jdbc.drivers
>
> which will mean that if the user sets it in user.properties, they get
> that one, regardless of the environment variable.  By reversing the
> order of the property tasks, you get the other behavior.

yeah, but you get the same effect with

<sql driver="${jdbc.drivers} />


--
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