This content has been marked as final.
Show 1 reply
-
1. Re: How do I make sure that all modules in a deployment use the same Classloader for a jar library?
darylfoster Dec 17, 2015 4:46 PM (in response to darylfoster)It turned out to be a relatively simple solution. I modified the pom.xml files for webportal.war, restapi.war, and dal.jar by adding a `scope` tag with a value of 'provided' for the model dependency:
<dependency>
<groupId>myproject</groupId>
<artifactiId>model</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
I then modified the pom.xml for myapp.ear by adding a dependency to model.jar with no scope tag (this will give the dependency the default scope which I believe is
compile
):<dependency>
<groupId>myproject</groupId>
<artifactiId>model</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>