Force Glassfish4 to use Guava from ear

36 views Asked by At

I have a maven project with an EJB and a war. For my use case, I have to use minIO which uses guava-30.1.1-jre. I am using GlassFish version 4 and inside the modules of GlassFish, an older version of Guava can be found. For war, I can use

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
  <class-loader delegate="false"/>
  <jsp-config>
    <property name="keepgenerated" value="true">
      <description>Keep a copy of the generated servlet class java code.</description>
    </property>
  </jsp-config>
</glassfish-web-app>

Setting delegate="false", there is no conflict of guava in the war project and I can use minIO but I want this in my EJB. How can I force my container to use guava from the ear and not from inside Glassfish> modules?

0

There are 0 answers