ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: Handel failure in sql tag
Date Thu, 01 May 2008 02:31:13 GMT

my advice is :

- do not use the <input/> task,

- create a small web application where your users would choose from a 
dropdown the JDBC URL to connect to

- have this web application kick off ant, passing -Ddb.hostname=foo 
-Ddb.port=1234 ..., or more simply -Djdbc.url=xxxxxxxx

where I am working, we are using CruiseControl and we have patched it to 
make it willing to start a build across JMX with a specific target and a 
list or map of properties.

So our web application passes properties for deployments to 
CruiseControl which then obligingly executes ...



JMAnt wrote:
> I try to connect to sql by ant and do successful.
> but if I want give sql connection url from user by input tag 
> I must check if it is correct or not. but I can't do it. and
> if url is incorrect my build job will terminate without any 
> announcement to user.
> If we can handle Exceptions and Error in build file and do some work after 
> failure?
> my related part of build.xml:
> 		<sql classpath="sql/${jdbc.jar}"
> 			driver="${jdbc.driver}"
> 			src="${temp.dir}/sqltemp/all.sql"
> 			url="jdbc:mysql://${db.hostname}:${db.port}/?autoReconnect=true"
> 			userid="${db.username}"
> 			password="${db.password}"
> 			onerror = "continue"
> 			/>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message