Is there a way to tell the sbt-onejar SBT plugin to produce a JAR in such way that the .class
files of my project are in "expanded" form and not under lib/myproject.jar
?
Alternatively, is it possible to tell sbt-onejar to produce a JAR that, when it's loaded, it actually unpacks/expands the nested JARs into a temporary folder and loads them from there, so that things like getResource(...)
return paths to physical files as opposed to jar:file:...
URLs?
Alternativel, I'd also happy with any vanilla OneJar solutions that help me produce a fat JAR wherein my own .class
files would be directly under the fat JAR as opposed to under lib/myproject.jar
.
I'm asking because Jetty does not seem to be able to load JSP files from inside of nested JAR files. There does seem to be a workaround by using a custom resource loader (see http://dev.eclipse.org/mhonarc/lists/jetty-users/msg01174.html for a report of the same problem and the workaround) but I don't seem to be able to get my servlets to actually use the overridden getResource
method provided in the workaround.