maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Perham" <Mike.Per...@webifysolutions.com>
Subject RE: derby-maven-plugin
Date Mon, 17 Apr 2006 14:21:16 GMT
We use the create=true flag in Spring jdbc datasource definition along
with a bootstrapping spring bean to load initial data.

	<bean id="wsf.container.dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
		<property
name="driverClassName"><value>org.apache.derby.jdbc.EmbeddedDriver</valu
e></property>
		<property
name="url"><value>jdbc:derby:target/test/testdb/${pom.artifactId};create
=true</value></property>
	</bean>

The artifactId is required for multimodule builds or else modules will
reuse each other's databases.

-----Original Message-----
From: ian.d.stewart@jpmchase.com [mailto:ian.d.stewart@jpmchase.com] 
Sent: Monday, April 17, 2006 9:01 AM
To: users@maven.apache.org
Subject: derby-maven-plugin

Dear List,

I am working on a database-centric web app, which I am using Maven2 to
manage.  In order to improve test runtimes and reduce dependencies on
external changes, I am using Apache Derby's EmbeddedDriver for database
interaction in the unit tests.

Once I've created the database and tables within Derby and populated the
tables with sample data, the tests run fine.  However, whenever somebody
else checks out the source and does 'mvn install', the tests fail quite
spectacularly (not really surprising, since the database infrastructure
is not in place on their machine).

Does anyone know of a mechanism within Maven (either a generic facility
or something specific to Derby) that can be used to create and populate
the database if it doesn't exist already?


Thanks,
Ian

It's better to be hated for who you are
than loved for who you are not

Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation JPMorganChase Global
Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078


---------------------------------------------------------------------
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


Mime
View raw message