K.C.,
Thank for the suggestion. I have found another solution. This one
involves using simple-jndi and does not require any code changes.
1) Include the dependency
<dependency>
<groupId>simple-jndi</groupId>
<artifactId>simple-jndi</artifactId>
<version>0.11.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.sql</groupId>
<artifactId>jdbc-stdext</artifactId>
</exclusion>
</exclusions>
</dependency>
2) Add the file jndi.properties to the test resource
directory, i.e. src/test/resources.
See simple-jndi site for configuration information.
http://www.osjava.org/simple-jndi
Paul Spencer
KC Baltz wrote:
Check out the JUnit DataSource Helper package at JavaRanch:
http://www.javaranch.com/codebarn.jsp
It'll allow you to configure a DataSource in a simple JNDI context via a properties file. And you can bind other properties using the standard JNDI API.
K.C.
-----Original Message-----
From: Paul Spencer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 12, 2006 8:22 AM
To: Maven Users List
Subject: [m2] Setup a jndi environment for testing (surfire)
I would like to setup a JNDI environment to be used during the testing
phase, i.e. the surefire plugin. The environment would contains
database (java:comp/env/jdbc) and environment entries (java:comp/env)
that would be used by the unit tests.
Suggestions?
Paul Spencer
---------------------------------------------------------------------
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]