You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nathan Coast <na...@codeczar.com> on 2003/09/30 06:56:06 UTC

sql / ddl execution

Hi,

I've been thinking about executing sql scripts as part of my maven build / 
assembly / test / deployment process.

rationale
1) setup / teardown for unit & integration tests.
2) db setup prior to deployment.
3) maintain all project artifacts in one place e.g. <proj>/src/ddl

Has anyone considered executing sql as a maven goal?  Anyone have any 
suggestions as to what aproach to take?  Also interested to hear if anyone 
thinks this is a bad idea, or if some other plugin or ant task fulfils this 
requirement.

A few ideas I've had
1) write a java class that executes the sql from a file.  Use properties to 
define connection details / sql file etc.
2) use something like the jstl jdbc tags to define the sql, could have this 
completely wrong as I haven't looked at these taglibs in any detail.

cheers
Nathan






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: sql / ddl execution

Posted by di...@multitask.com.au.
I use the ant sql task.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


Nathan Coast <na...@codeczar.com> wrote on 30/09/2003 02:56:06 PM:

> Hi,
> 
> I've been thinking about executing sql scripts as part of my maven build 
/ 
> assembly / test / deployment process.
> 
> rationale
> 1) setup / teardown for unit & integration tests.
> 2) db setup prior to deployment.
> 3) maintain all project artifacts in one place e.g. <proj>/src/ddl
> 
> Has anyone considered executing sql as a maven goal?  Anyone have any 
> suggestions as to what aproach to take?  Also interested to hear if 
anyone 
> thinks this is a bad idea, or if some other plugin or ant task fulfils 
this 
> requirement.
> 
> A few ideas I've had
> 1) write a java class that executes the sql from a file.  Use properties 
to 
> define connection details / sql file etc.
> 2) use something like the jstl jdbc tags to define the sql, could have 
this 
> completely wrong as I haven't looked at these taglibs in any detail.
> 
> cheers
> Nathan
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org