From: Michael C. <chi...@mi...> - 2016-07-07 23:28:07
|
On 7/7/2016 6:08 PM, Stefan Richthofer wrote: > This looks like you placed a jar-file inside a jar-file. > I never tried this, but I doubt that Jython (actually Java?) can handle such > nesting of jars (maybe this feature was added and I am overlooking it, sorry in > that case). It's possible; spring-boot does it [1]. I guess with the ability to write custom classloaders, the sky's the limit :) According to > http://www.jython.org/jythonbook/en/1.0/SimpleWebApps.html?highlight=explode#distributing-via-standalone-jar > (which is somewhat dated though) you should "explode" jython-standalone, add > your code-files and then jar it again. I suppose you would have to do this with > your other dependencies too or distribute them as separate files. > (Maybe you better try this with a toy-example first, before re-packing all the > jars). That's sometimes referred to as a "shaded" jar. [1] mentions that approach too. > Looking at this, the need for some kind of deployment-tool that would automate > such a process comes to my mind. You should maybe check, whether such a thing > already exists (maybe for Java-apps in general). I know Maven has a plugin for it [2]. Other build tools might too. I don't know if this is helpful for Ranga's actual problem, but from the quoted email, I thought it would be of interest. Andy 1. http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#executable-jar 2. http://maven.apache.org/plugins/maven-shade-plugin/ |