Jar is only executed when fat jar

Hi everyone, the last two days I have been struggling with an issue which I hope somebody can help me with.

We have a project which has several plugins which are loaded initially when the application starts. Now all the plugins are loaded normally, just this one plugin cannot be loaded. The only way I can get it to load is if I change the generated jar (for that particular subproject) to include all of its dependencies in the jar itself (all the jars are max 500KB, this one plugin is now 90MB in size).

My question is how do I debug something like this? I know its a very specific problem but I really don’t know what to do. I have tried adding all the dependencies to the classpath for that plugin but to no avail.

You will need to provide more information so we have a better idea of what’s going on.

  1. Did the plugin ever work?
  2. What exactly has changed between plugin versions?
  3. What exactly means “plugin cannot be loaded”? Please provide a stack trace.
  4. Why are you trying to include all dependencies to a plugin? When publishing a plugin its metadata will contain all information necessary to resolve the dependencies. It’s common practice to do that. It also minimizes the plugin footprint.
  1. Yes the plugin works perfectly when in another project. I just migrated the existing project to a new Gradle build.
  2. The only thing changed is the location of the resources (previously they were directly in /src, now they are /src/main/resources).
  3. That’s the thing, there is no stacktrace at all.
  4. Well that is the exact thing I am trying to not do. But the only way it works now, is if I include all the dependencies in the jar.

It’s a pretty specific problem I guess, so I will keep on looking. The topic can be closed.