Closed BoltyDawg closed 6 years ago
Which artifact are you adding as the dependency? You seem to be the first one having this issue, which is a bit weird.
I just copy pasted the dependency straight off the plugin page, but I'll put what I have here:
<dependency>
<groupId>org.inventivetalent.nicknamer</groupId>
<artifactId>api</artifactId>
<version>3.14.1-SNAPSHOT</version>
</dependency>
Okay so I just went through my dependency hierarchy, and after excluding bcel-findbugs and mongodb-driver it compiles okay. But naturally, actually using the API results in an UnsupportedOperationException so that's no good. Here's a picture of what my dependency hierarchy looks like (before the exclusions):
Also, I'm not sure if this is related, but whenever I start up the server I get this message:
[SpigetUpdate] Invalid SemVer versions specified [3141-SNAPSHOT] [3140-SNAPSHOT]
Sorry for all the questions, this is my first plugin so I get a feeling that I'm just doing something stupid here, I'm sorry!
Most of the API methods will throw an UnsupportedOperationException, because the api itself isn't able to handle those methods. You need to install the NickNamer plugin on your server to actually add any functionality to those methods. So just use the api dependency in your project and then install the plugin and you should be fine.
NickNamer is installed and functional on my server though.
My plugin wouldn't even build until I added the exclusions on the mongodb-driver and bcel-findbugs archives, which apparently causes the API to lose functionality. Do I need to add separate dependencies for these two? I tried doing that and it still didn't work. This is verbatim the error I get in Eclipse when trying to build my plugin normally (my plugin is RPMagic):
Archive for required library: 'C:/Users/Jay/.m2/repository/com/google/code/findbugs/bcel-findbugs/6.0/bcel-findbugs-6.0.jar' in project 'RPMagic' cannot be read or is not a valid ZIP file RPMagic - Build path - Build Path Problem
edit:
I've boiled it down to this dependency in your api's pom.xml
<dependency>
<groupId>org.inventivetalent</groupId>
<artifactId>data-api</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
This is what contains both the bcel-findbugs and the mongoDB-driver. If I add this as a dependency on it's own (without NickNamer) it gives me these errors. I have no clue why this is happening, I've used other APIs and didn't have any issues...
I switched to a different nickname plugin
What steps will reproduce the problem?
What were you expecting to happen? What happened instead?
I used the Maven code provided on the page to build it, but when I do so I get an error stating: ".../repository/com/google/code/findbugs/bcel-findbugs/6.0/bcel-findbugs-6.0.jar' cannot be read or is not a valid ZIP file"
What version of the plugin are you using?
3.14.1 - I tried other version too
What Spigot version are you using?
1.12.2
Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)
I added the dependency for bcel-findbugs but it still doesn't work