Spongevanilla and standalone libraries

Where am i supposed to place standalone libraries when using spongevanilla?

If i use spongeforge (almost) all non-mod jars i put into the mods folder are added to the classpath, this approach seems to not be working with spongevanilla (spongevanilla-1.9-5.0.0-BETA-8), it only throws some warnings in console.

[08:43:17 ERROR] [Sponge]: No valid plugins found in mods\postgresql-9.4-1206-jd
bc42.jar. Is the file actually a plugin JAR? Please keep in mind Forge mods can
be only loaded on SpongeForge servers, SpongeVanilla supports only Sponge plugin
s.

Am i supposed to load libraries manually or is there another way?

You should generally include third-party classes you need directly in your plugin-JAR file, e.g. by using the Gradle shadow plugin or the Maven shade plugin.

I know this is possible but i dont want to do this. For example i have support for multiple db, due to this reason i wont put all existing jdbc drivers into my plugin jar.

Sponge has a SQL service provider

Is your dependency specified in the Class-Path entry in your jar manifest?

nope, i guess this is the only way then?

If you have an external dependency then yes you should specify it in the jar metadata. You might still get the error when it tries to enumerate it as as plugin jar (though potentially that would be easy to fix) but SpongeVanilla should then inject it when injecting your plugin jar.

Is this behavior intended, or are there any plans in future for unifying external non-mod/plugin jar loading just as forge/spongeforge has?

1 Like