Thanks makes sense! Thanks Wayne.

Naresh

-----Original Message-----
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 27, 2006 3:06 PM
To: Maven Users List
Subject: Re: How to integrate database builds in to the Maven build
lifecycle?

Have you looked at the complete list of phases?
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycl
e.html

Sounds to me like you might want to hook it up like:
@generate-test-resources   drop-schema
@process-test-resources    create-schema

Wayne

On 10/27/06, Naresh Bhatia <[EMAIL PROTECTED]> wrote:
> I would like to find out how people use Maven to integrate database
> builds into the Maven build cycle. My team is currently using a
> multiple-pass approach, i.e. invoking Maven multiple times with
> different goals - primary reason is that the database schema is
> generated from a UML model during the build. Here's the sequence of
> steps we use to build and test our app:
>
> 1) mvn drop-schema  <-- custom goal to drop existing schema from
> database
> 2) mvn compile
> 3) mvn create-schema  <-- custom goal to create schema in the database
> 4) mvn test
>
> Note that doing a "mvn install" on freshly checked out source fails
the
> tests because there is no schema in the database. We have to either
> perform all of the steps above or run "mvn install
> -Dmaven.test.skip=true" in order to succeed the build. How can we
> integrate the schema drop and create into the regular build cycle so
> that a simple "mvn install" would work? It appears that we should be
> hooking into some phases of the Maven build cycle, but I do not want
to
> reinvent the wheel if there is a well known best practice around this.
>
> Thanks.
> Naresh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to