Hi,
I am running into the following problem while creating a unit/
integration test with Maven:
I want to test a jndi lookup in my test class, which is looking up an
EJB (Stateless session bean) that is defined in separate Maven
project. This module is added as dependency in my pom file but the
EJB's in it don't show up in the global jndi list of the embedded
OpenEJB when my test run.
If I deploy the module in GlassFish I see the EJB in the JNDI tree so
I assume that that part is valid. How can I tell OpenEJB to install
the EJB-JAR that is referred to in the dependency before my test take
place??
Here is my pom.xml:
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>my-mule-layer</artifactId>
<groupId>net.pascalalma</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>net.pascalalma</groupId>
<artifactId>my-mule-core</artifactId>
<name>${artifactId}</name>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-core</artifactId>
<version>3.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.pascalalma</groupId>
<artifactId>my-business-services</artifactId>
<version>1.0-SNAPSHOT</version>
<type>ejb</type>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Kind regards/,
Pascal Alma