Hi, in ChestCommands/Plugin, duplicate classes with the same fully-qualified name com.google.gson.stream.JsonReader.nextInt are included in two different libraries, i.e., me.clip:placeholderapi:2.9.2 and com.google.code.gson:gson:2.2.4.
According to "first declaration wins" class loading strategy, only this class in com.google.code.gson:gson:2.2.4 can be loaded, and that in me.clip:placeholderapi:2.9.2 will be shadowed.
By further analyzing, your project expects to invoke method com.google.gson.stream.JsonReader.nextInt in me.clip:placeholderapi:2.9.2. As it has been shadowed, so that this method defined in com.google.code.gson:gson:2.2.4 are actually forced to be referenced via the following invocation path:
<com.gmail.filoghost.chestcommands.config.AsciiPlaceholders: placeholdersToSymbols(Ljava/lang/String;)Ljava/lang/String;> /root/sensor/unzip/ChestCommands-master/Plugin/target/classes
<com.google.gson.JsonStreamParser: next()Ljava/lang/Object;> /root/.m2/repository/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar
<com.google.gson.JsonStreamParser: next()Lcom/google/gson/JsonElement;> /root/.m2/repository/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar
<com.google.gson.internal.Streams: parse(Lcom/google/gson/stream/JsonReader;)Lcom/google/gson/JsonElement;> /root/.m2/repository/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar
<com.google.gson.internal.bind.TypeAdapters$7: read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;> /root/.m2/repository/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar
<com.google.gson.internal.bind.TypeAdapters$7: read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Number;> /root/.m2/repository/me/clip/placeholderapi/2.9.2/placeholderapi-2.9.2.jar
<com.google.gson.stream.JsonReader: nextInt()I>
Workaround solution:
An easy way to workaround the problem is reversing the declaration order of these two libraries (i.e., reverse the declaration order of httpclient and maven-resolver-transport-http) in pom file.
Then, according to "first declaration wins" class loading strategy, class com.google.gson.stream.JsonReader.nextInt in me.clip:placeholderapi:2.9.2 can be loaded (the version that ChestCommands/Plugin expects to reference by static analysis).
This fix will not affect other libraries or class, except the above duplicate class.
Dependency tree---
[INFO] com.gmail.filoghost.chestcommands:chestcommands-plugin:jar:3.3.0-SNAPSHOT
[INFO] +- org.spigotmc:spigot-api:jar:1.8.8-R0.1-SNAPSHOT:provided
[INFO] | +- commons-lang:commons-lang:jar:2.6:provided
[INFO] | +- com.googlecode.json-simple:json-simple:jar:1.1.1:provided
[INFO] | | - junit:junit:jar:4.10:provided
[INFO] | | - org.hamcrest:hamcrest-core:jar:1.1:provided
[INFO] | +- com.google.guava:guava:jar:17.0:provided
[INFO] | +- com.google.code.gson:gson:jar:2.2.4:provided
[INFO] | +- org.avaje:ebean:jar:2.8.1:provided
[INFO] | | - javax.persistence:persistence-api:jar:1.0:provided
[INFO] | +- org.yaml:snakeyaml:jar:1.15:provided
[INFO] | - net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT:provided
[INFO] +- net.milkbowl.vault:VaultAPI:jar:1.6:provided
[INFO] | - org.bukkit:bukkit:jar:1.9-R0.1-SNAPSHOT:provided
[INFO] +- me.confuser:BarAPI:jar:3.5:provided
[INFO] +- me.clip:placeholderapi:jar:2.9.2:provided
[INFO] - org.bstats:bstats-bukkit-lite:jar:1.4:compile
Thank you very much.
Best,
Coco