We plan to use the ant task "exec", and its attribute "os" to manage the
difference between operating system.
Our projects use an Oracle database, so the "exec" task will execute
"sqlplus" with a sql script file.
We plan to follow this way during the life of our project:
a) for the first release (V1), we will use the "exec" ant task to
drop and create the V1 database schema,
b) when the V1 will be released, we will export the schema (data and
DDL) in a dump file
c) for the next release (V2), according to the possible project
installation (from scratch, or over the previous version), we will use:
c1) for "from scratch" case: "exec" ant task to drop and
create the V2 database schema,
c2) for "over the previous release" case: "exec" ant task to
drop, import V1 dump file and migrate from V1 to V2 with the database
patch script,
Our projects that are planned to use this way, have an manual
installation procedure (helped by scripts)
____________________________________________________________________________
Christophe DENEUX / Capgemini Sud / Méditerranée
Technical Leader
Tel: + 33 4 93 72 43 74 / www.capgemini.com
Fax: + 33 4 93 21 02 95
Porte de l'Arénas - Entrée B / 455 Promenade des Anglais / 06200 Nice
Join the Collaborative Business Experience
____________________________________________________________________________
Donnchadh Ó Donnabháin a écrit :
Yes, ours is a continuous integration context too. What ant task do
you use?
At it's simplest we could execute the mysql command with the DDL script.
I guess what I'm looking for is, what is the standard way of doing
this? I would imagine that a large proportion of of projects using
maven are database-backed, (presumably the majority of web
applications that use maven) so there must be a standard way of
deploying a database schema from a maven build.
Alternatives to getting the build to deploy the schema is to package
the DDL script into the webapp and get it to run it on startup if
necessary.
Donnchadh
On 9/1/06, Christophe DENEUX <[EMAIL PROTECTED]> wrote:
We are thinking to a solution on a similar problem, but in a contionuous
integration context.
Our solution should be the following:
- on the pre-integration-tests phase, execute the following tasks
through the maven-antrun-plugin:
1 - drop all tables in your database
2 - import a database corresponding to the previous version of
your webapp
3 - run sql scripts to update the database schema.
- on the integration-test phase, execute your jWebUnit tests
I think that to use the setup methods of the test-cases to initialize
the database schema is not a good idea because you will probably update
your testcases in the next release of your webapp.
We use profiles to deploy on different QA environments.
____________________________________________________________________________
Christophe DENEUX / Capgemini Sud / Méditerranée
Technical Leader
Tel: + 33 4 93 72 43 74 / www.capgemini.com
Fax: + 33 4 93 21 02 95
Porte de l'Arénas - Entrée B / 455 Promenade des Anglais / 06200 Nice
Join the Collaborative Business Experience
____________________________________________________________________________
Donnchadh Ó Donnabháin a écrit :
> Hi everyone,
>
> I'm using the cargo plugin to deploy a webapp to tomcat. This webapp
> depends on a database and I would like run a SQL script to deploy the
> updated schema before deploying the webapp. What is the best approach
> to this? Is there a plugin to facilitate this?
>
> Once I have this working I would like to perform integration tests
> (probably using jWebUnit and htmlunit) and if they succeed, deploy the
> webapp to another context to provide feedback to the client
>
> Donnchadh
>
> ---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is intended only for the person to whom
it is addressed. If you are not the intended recipient, you are not authorized
to read, print, retain, copy, disseminate, distribute, or use this message or
any part thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]