You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Victor Bendig <vi...@gmail.com> on 2007/08/04 20:08:37 UTC
Database lifecycle in Maven
Hi,
Have a couple of questions around databases and maven,
1. Does Maven create standards for database development?
2. Is there a plugin that handles the lifecycle of the database (create,
drop, etc)
I found a sql-maven-plugin but this forces me to bind sql files to code
phases. While this might be good when testing, I find it might be heavy if
I bind the install of my project with the database creation.
Any ideas where I can look for this?
Regards,
--
Victor Bendig
Re: Database lifecycle in Maven
Posted by Dion Gillard <di...@trongus.com>.
We do this in our internal maven 1.x 'db' plugin.
We have goals like:
db:create
db:create-schema
db:drop-schema
db:delete
db:clean
db:load-dataset
db:unload-dataset
etc...
On 8/8/07, Eric Redmond <eric.redmond@gmail.com > wrote:
>
> This may be a good suggestion for JIRA. I am not against the addition of a
>
> database lifecycle, since it is a valid case. Though some may claim it is
> a
> slippery slope - I have suggested a release lifecycle for similar
> arguments... it is something you do occasionally (like "clean" or "site")
> but is common enough to standardize.
>
> --
> Eric Redmond
> http://blog.propellors.net
>
> On 8/4/07, Victor Bendig <victorbendig@gmail.com > wrote:
> >
> > Hi,
> >
> > Have a couple of questions around databases and maven,
> >
> > 1. Does Maven create standards for database development?
> > 2. Is there a plugin that handles the lifecycle of the database (create,
>
> > drop, etc)
> >
> > I found a sql-maven-plugin but this forces me to bind sql files to code
> > phases. While this might be good when testing, I find it might be heavy
> > if
> > I bind the install of my project with the database creation.
> >
> > Any ideas where I can look for this?
> >
> > Regards,
> >
> >
> > --
> > Victor Bendig
> >
>
--
dIon Gillard
Rule #131 of Acquisition: Information is Profit.
Re: Database lifecycle in Maven
Posted by Eric Redmond <er...@gmail.com>.
This may be a good suggestion for JIRA. I am not against the addition of a
database lifecycle, since it is a valid case. Though some may claim it is a
slippery slope - I have suggested a release lifecycle for similar
arguments... it is something you do occasionally (like "clean" or "site")
but is common enough to standardize.
--
Eric Redmond
http://blog.propellors.net
On 8/4/07, Victor Bendig <vi...@gmail.com> wrote:
>
> Hi,
>
> Have a couple of questions around databases and maven,
>
> 1. Does Maven create standards for database development?
> 2. Is there a plugin that handles the lifecycle of the database (create,
> drop, etc)
>
> I found a sql-maven-plugin but this forces me to bind sql files to code
> phases. While this might be good when testing, I find it might be heavy
> if
> I bind the install of my project with the database creation.
>
> Any ideas where I can look for this?
>
> Regards,
>
>
> --
> Victor Bendig
>
Re: Database lifecycle in Maven
Posted by Wayne Fay <wa...@gmail.com>.
> What about a developer that checks out this project for the
> first time, how do they create a local version of the DB, do they need
> to know to run the ant script as a separate step?
Yes.
I never claimed it was ideal. This is primarily because of political
issues in the way our operations team is organized.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Database lifecycle in Maven
Posted by chriscoder <ch...@yahoo.com>.
Hi,
I have a pom for creating the database via
hibernate3 with hbm2ddl, hbm2java. This works fine.
This pom packages the jar for the hibernate pojo's.
I also added the sql plugin and added some sql statements to drop db, create
db,
and run the sql created from the hbm2ddl. I found that for the sql plugin I
have to tie
the sql execution to a specific phase( package in my case). maybe I should
put this in
it's own pom.
My real question is, when you say "manually with ant scripts
that run before/after our builds/deploys"
What are you using to drive your build?
What about a developer that checks out this project for the
first time, how do they create a local version of the DB, do they need
to know to run the ant script as a separate step?
thanks,
Chris
This is the second time you've asked, so I figured I'd reply with what
I know, which isn't much.
1) Not that I am aware of.
2) Not that I am aware of. We handle this manually with ant scripts
that run before/after our builds/deploys.
Wayne
--
View this message in context: http://www.nabble.com/Database-lifecycle-in-Maven-tf4217563s177.html#a12067434
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Database lifecycle in Maven
Posted by Geoffrey De Smet <ge...@gmail.com>.
We have a one-time-use prebuild.sh script to create 2 databases (not the
tables): a normal one and a test one.
Our integration tests are done in spring, which:
1) Boots hibernate-jpa, which does a hbm2ddl=create to create the tables
2) Fires DBunit to create testdata in that database.
Our normal runs in development for now use hbm2ddl=update.
Maven's lifecycle really isn't used in this process.
With kind regards,
Geoffrey De Smet
Wayne Fay wrote:
> This is the second time you've asked, so I figured I'd reply with what
> I know, which isn't much.
>
> 1) Not that I am aware of.
> 2) Not that I am aware of. We handle this manually with ant scripts
> that run before/after our builds/deploys.
>
> Wayne
>
> On 8/4/07, Victor Bendig <vi...@gmail.com> wrote:
>> Hi,
>>
>> Have a couple of questions around databases and maven,
>>
>> 1. Does Maven create standards for database development?
>> 2. Is there a plugin that handles the lifecycle of the database (create,
>> drop, etc)
>>
>> I found a sql-maven-plugin but this forces me to bind sql files to code
>> phases. While this might be good when testing, I find it might be heavy if
>> I bind the install of my project with the database creation.
>>
>> Any ideas where I can look for this?
>>
>> Regards,
>>
>>
>> --
>> Victor Bendig
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Database lifecycle in Maven
Posted by Wayne Fay <wa...@gmail.com>.
This is the second time you've asked, so I figured I'd reply with what
I know, which isn't much.
1) Not that I am aware of.
2) Not that I am aware of. We handle this manually with ant scripts
that run before/after our builds/deploys.
Wayne
On 8/4/07, Victor Bendig <vi...@gmail.com> wrote:
> Hi,
>
> Have a couple of questions around databases and maven,
>
> 1. Does Maven create standards for database development?
> 2. Is there a plugin that handles the lifecycle of the database (create,
> drop, etc)
>
> I found a sql-maven-plugin but this forces me to bind sql files to code
> phases. While this might be good when testing, I find it might be heavy if
> I bind the install of my project with the database creation.
>
> Any ideas where I can look for this?
>
> Regards,
>
>
> --
> Victor Bendig
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org