tchristofferson / Config-Updater

Used to update files for Bukkit/Spigot API
MIT License
66 stars 9 forks source link

NoClassDefFoundError #11

Closed PretzelJohn closed 2 years ago

PretzelJohn commented 2 years ago

When loading my plugin, I get the following error: java.lang.NoClassDefFoundError: com/tchristofferson/configupdater/ConfigUpdater

This error is caused by ConfigUpdater not being included in the packaged jar. Here is my pom.xml:

`<?xml version="1.0" encoding="UTF-8"?>

4.0.0 com.pretzel.dev VillagerTradeLimiter 1.3.1 1.8 src org.apache.maven.plugins maven-compiler-plugin 3.8.1 ${java.version} ${java.version} spigotmc-repo https://hub.spigotmc.org/nexus/content/repositories/snapshots/ maven-central https://oss.sonatype.org/content/groups/public org.spigotmc spigot 1.17-R0.1-SNAPSHOT org.spigotmc spigot-api 1.16.5-R0.1-SNAPSHOT provided com.tchristofferson ConfigUpdater 2.0-SNAPSHOT compile `
FN-FAL113 commented 2 years ago

Relocate the shaded package

tchristofferson commented 2 years ago

Look into the Maven Shade plugin. There are many resources online that are available such as https://stackoverflow.com/questions/10568275/noclassdeffounderror-on-maven-dependency.