What about building libraries from Github?


Regarding the JVM lessons,

What about when you want to obtain a Java/Groovy/Scala/etc library on Github, to call from Clojure, that contains only the source, but no binaries? Are there some general tips for building that would work in a lot of circumstances?

The discussion Dependencies explains how to search for libraries in the Maven Repository. But is it possible for some of the published projects to have a pom.xml with all of the source, but no .jar, even in the Maven Repository? Do we just download Maven, and

mvn package

, or does it get more complicated?


Hi @ClojureExplorer,

That’s a really good question.

One thing you can do is to install the jar to your local repository, which is in ~/.m2. This might be as easy as checking out the repo and running mvn install or gradle install, depending on how the project is set up. With leiningen, it’s a simple lein install. With Boot, it’s boot install.

If it’s a Leiningen project, you can use “checkout dependencies”: https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies Leiningen can detect changes to any projects under the checkouts directory. They suggest simlinking but you can also use git submodules as long as they’re in the checkouts directory.

If that doesn’t help, shoot me a link to the repo in question. I’ll take a look.



Ok, thanks. I guess I was suggesting that maybe this topic should be in the JVM videos, somewhere. There’s only so much you can cover, but some general tips about generating Jars from Groovy or Java projects could be helpful, with links for more information.

Also, I don’t know how to identify a Gradle Project.