Hi Robert,

You might be able to get what you want by writing a custom ant Task, i.e., a class which extends org.apache.tools.ant.Task. If you need some examples of how to do this, you can grep the Derby source tree for "PropertySetter" or "MessageBuilder".

Hope this is useful,
-Rick

Robert J. Carr wrote:
I'm using an embedded derby database in my application.  There is an
initialization that requires some table updates and I'd like to have
these done in ant using the <sql> task.

The problem I'm having is setting the 'derby.system.home' system
property.  Unlike the <java> task, the <sql> task doesn't take the
nested <sysproperty> property.

I'm sure it could be done with environment variables but I'd like to
avoid doing this if possible.

Are there any solutions others have used?  I'm not aware of a way to
have ant set a system property outside of the <java> task.

The kludge I've come up with is, since I was already using groovy for
something else, I embedded a line of groovy to set
'derby.system.home'.  Thankfully the <sql> task isn't forked so the
property persists.  But I do feel this is a kludge and would like to
know a better way, if possible.

Thanks!

Reply via email to