You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Brian E. Fox" <br...@reply.infinity.nu> on 2005/11/09 18:21:45 UTC

How to make self contained database dependant unit tests in maven 2?

We currently have a system that uses JDO (Kodo implementation) for our
persistence layer. In order to test these persistent classes, I need to
have a JDBC driver and compliant database running. I would really like
to make the process completely self contained like the Maven Wagon
builds. ie download a jar from somewhere that gives me an ultra light db
implementation and jdbc driver and run my tests on it. 
 
Does anyone know if such a thing exists and where I might find it?
Alternatively, does anyone know of any decent file based jdbc drivers
that are open source?
 
Thanks.

Re: How to make self contained database dependant unit tests in maven 2?

Posted by Eric Pugh <ep...@upstate.com>.
Take a look at some of the in memory Java databases.  We use  
Hibernate with Hypersonic in test, and then switch to MSSQLServer in  
production very successfully.

Eric

On Nov 9, 2005, at 5:21 PM, Brian E. Fox wrote:

> We currently have a system that uses JDO (Kodo implementation) for our
> persistence layer. In order to test these persistent classes, I  
> need to
> have a JDBC driver and compliant database running. I would really like
> to make the process completely self contained like the Maven Wagon
> builds. ie download a jar from somewhere that gives me an ultra  
> light db
> implementation and jdbc driver and run my tests on it.
>
> Does anyone know if such a thing exists and where I might find it?
> Alternatively, does anyone know of any decent file based jdbc drivers
> that are open source?
>
> Thanks.
>


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


Re: How to make self contained database dependant unit tests in maven 2?

Posted by Chris Richardson <ch...@gmail.com>.
I use HSQL DB (http://hsqldb.org/) for testing with both Kodo JDO and
Hibernate.
It works well and is very fast.
This is what I have in my pom.xml

<dependency>
  <groupId>hsqldb</groupId>
  <artifactId>hsqldb</artifactId>
  <version>1.7.2.2 <http://1.7.2.2></version>
  <scope>test</scope>
 </dependency>

Chris


--
Enterprise POJO consulting - http://www.chrisrichardson.net
Author, POJOs in Action - http://www.manning.com/crichardson
Enterprise POJOs blog - http://chris-richardson.blog-city.com

On 11/9/05, Brian E. Fox <br...@reply.infinity.nu> wrote:
>
> We currently have a system that uses JDO (Kodo implementation) for our
> persistence layer. In order to test these persistent classes, I need to
> have a JDBC driver and compliant database running. I would really like
> to make the process completely self contained like the Maven Wagon
> builds. ie download a jar from somewhere that gives me an ultra light db
> implementation and jdbc driver and run my tests on it.
>
> Does anyone know if such a thing exists and where I might find it?
> Alternatively, does anyone know of any decent file based jdbc drivers
> that are open source?
>
> Thanks.
>
>