How can I add a jar that is already in a deployment? Let me explain how I tried to do it. I have:
one-ear.ear
one-ejb.jar
two-ear.ear
two-ejb.jar
I placed a jboss-deployment-structure.xml into the top level of one-ear.ear META-INF and it is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="deployment.two-ear.ear.two-ejb-0.0.1-SNAPSHOT.jar" />
</dependencies>
</deployment>
</jboss-deployment-structure>
However I am not sure it is actually importing classes from that jar, because when I try to import a class it does not work. Not sure what I am doing wrong.