[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [m2e-users] ejb-client dependency in ear project | 
Hello,
i am using m2eclipse 0.12.1 with the current WTP integration from m2e/extras.
I have a problem using ejb-client artifact. How do i add a dependency to a ejb-client artifact?
My project is an enterprise application (EAR). It contains a simple library (jar), an EJB jar and a WAR.
The EJB uses a remote (well, at least not in the same EAR) Service from another EJB-Project.
From maven viewpoint i would suggest a configuration like this:
EJB-Project (abbreviated) :
<project>
   <dependencies>
      <dependency>
         <groupId>com.example</groupId>
         <artifactId>example</artifactId>
         <version>1</version>
         <scope>compile</scope>
         <type>ejb-client</type>
      </dependency>
   <dependencies>
</project>
In the EAR Project i have defined a defaultLibBundleDir of "lib".
When i deploy to my server m2eclipse puts my library dependencies
into EAR-Project/lib. But for some reason the ejb-client library is
put into the root of the EAR-Project. This results in ClassNotFoundExceptions.
Another problem related to this is, m2eclipse resolves my ejb-client
dependency from the workspace. If this happens and i deploy to the
server, the whole EJB Project will be packaged into the EAR although
i declared a dependency only on the client artifact. A simple workaround
for this is to close the EJB Project. But the problem mentioned above
remains.
How can i depend on an ejb-client artifact when i use m2eclipse and
package an EAR project?