On 7/31/13 4:18 AM, Alex Fowler wrote: > I have an application which is built fine with uberjar with an exception of > two things which do not get incuded: > 1) Additonal jar files (about 150Mb) from various Java libraries that are > not present on Clojars and that I have no power of will or time of trying > to upload them there. This folder is speciiified with :resource-paths in > project.clj.... > 2) About 150Mb of resources such as pictures and video-files which are > loaded by these java libraries using *their own methods* which I cannot > change. > > What lein uberjar does - it skips these files and simply creates an > incomplete jar with my compiled sources, which does not launch because it > is missing those files. However, "lein run" works just fine! > > My question is: how do I make a single jar with lein that, being run with > "java -jar" exposes the same behavior as simply "lein run"? > > PS: As an idea: when I was programming in Scala, I was using > "com.jdotsoft.jarloader.JarClassLoader" which was the entry point in my app > and I could simply put all files into the jar and it would search them in > that order: > 1) recursively inside the jar > 2) in the same folder as the jar (which would allow simple externalizing of > files like settings files if needed to be exposed to users). > 3) in system path folders... > Maybe there is a way to use that magical JarClassLoader with > Leiningen/Clojure? >
clojars is just a maven repo, and a simple maven repo is just a http server. you can setup your own "private maven repo" easily by copying the directory structure of your ~/.m2 to an http server somewhere. for something more full featured you can setup something like apache archiva (which is what I use at work) http://archiva.apache.org/index.cgi once you have a private maven repo you can deploy whatever you want to it, and use whatever you deploy has a dependency as normal -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things?
signature.asc
Description: OpenPGP digital signature