Context
JBang does not support provided scope for dependencies (jbangdev/jbang#1749). This means --class-path entries passed to jbang export fatjar get bundled into the output JAR, causing a 592MB fat JAR with classloader conflicts (see #1876).
Current Workaround
JBangRunner.stripClasspathEntries() post-processes the fat JAR after export, removing all entries that came from the --class-path JARs while keeping UDF classes, META-INF/, and //DEPS dependencies.
Action
When jbangdev/jbang#1749 is resolved and JBang supports provided scope:
- Update
JBangRunner.exportFatJar() to use the provided scope mechanism instead of --class-path
- Remove
stripClasspathEntries() and collectJarEntryNames()
- Remove the related unit tests in
JBangRunnerTest
References
Context
JBang does not support
providedscope for dependencies (jbangdev/jbang#1749). This means--class-pathentries passed tojbang export fatjarget bundled into the output JAR, causing a 592MB fat JAR with classloader conflicts (see #1876).Current Workaround
JBangRunner.stripClasspathEntries()post-processes the fat JAR after export, removing all entries that came from the--class-pathJARs while keeping UDF classes,META-INF/, and//DEPSdependencies.Action
When jbangdev/jbang#1749 is resolved and JBang supports
providedscope:JBangRunner.exportFatJar()to use the provided scope mechanism instead of--class-pathstripClasspathEntries()andcollectJarEntryNames()JBangRunnerTestReferences