Last Updated: February 25, 2016
·
445
· delitescere

Leiningen driving a Java app

You can't stand Maven and want lein to manage the build of a Java app?

I suggest using a Clojure "main" to make life easier. All it does is use environ to get configuration data, then instantiates the Java class which is your real main.

I also suggest using SLF4J logging with the Log4J2 driver because of the excellent Disruptor-based AsyncLoggers and simple YAML configuration (and lovely colored formatters).

As you are writing a Java app, you probably want JUnit4 as well.

Here is a sample project.clj to do the work for you:

https://gist.github.com/delitescere/f1ab2055b75cc6a2f8ef