2

Heyho,

I'm currently developing a bukkit plugin and I want to use guava. Bukkit still uses Guava 11.0, but I want to use 14.0. So I tried to relocate guava in my main module. This worked perfectly. An other module on the same level uses guava too and it needs the "same" guava. So the guava which is also used in the main project. Of course the imports changed and the main project and the other module are not compatible.

Project structure:

parent:

  • main module: Uses a relocated version of guava(14.0)#
  • an other module: Uses guava 14.0 but not relocated -> not compatible with the main module

I already tried to relocate guava to the same path in the other module but nothing happens.

Maybe anyone has an idea how to fix this. I just need a way to use my relocated guava in my other module :/

Related post: Maven shade relocations accross all modules?

Community
  • 1
  • 1
maxammann
  • 1,018
  • 3
  • 11
  • 17

1 Answers1

0

Have you tried excluding v14 from the the Bukkit dependency? Forgive the naming conventions below. I did not look up the dependencies in Maven.

<dependencies>
 <dependency>
  <groupId>Bukkit</groupId>
  <artifactId>Something</artifactId>
  <version>1.0</version>
  <exclusions>
    <exclusion>  <!-- declare the exclusion here -->
      <groupId>Guava</groupId>
      <artifactId>v14</artifactId>
    </exclusion>
  </exclusions> 
 </dependency>
</dependencies>
neal
  • 880
  • 6
  • 11