Solved Specific maven dependency compiles fine but throws ClassNotFoundException in-game

Discussion in 'Plugin Development' started by Scullyking, Jun 30, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Scullyking

    This is weird.

    I've added a maven dependency to my project for the Fanciful JSON chat library. It imports fine and I'm able to start writing with the API in my plugin. Then I build my project into a good ol' jar and start the server. The server starts fine.

    But. When any of the Fanciful code is called it throws a ClassNotFoundException.

    Furthermore I have other maven dependencies (such as the VaultAPI) which work fine.

    Any ideas?

    pom.xml
     
  2. Try shading the fanciful API into your plugin, try this as your pom: http://hastebin.com/olexecovik.xml

    I added in a shade plugin from maven. This will shade in any repo that doesn't have a scope defined. For example, <scope>system</scope> and <scope>provided</scope> are on every repo except the FancifulAPI. So try that.
     
    Scullyking likes this.
  3. Offline

    Scullyking

Thread Status:
Not open for further replies.

Share This Page