File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Clojure and the fly likes Rewriting Java code in Clojure and compiling it Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Clojure
Bookmark "Rewriting Java code in Clojure and compiling it" Watch "Rewriting Java code in Clojure and compiling it" New topic

Rewriting Java code in Clojure and compiling it

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3476

I use Clojure to write a couple of scripts and hacks but what if you want to use it to substitute my Java code (like Spring beans, beans in general, Servlets)?
Any special points I should pay attention to?
Clojure provides compilation facility, for example:

Any idea how integrate this facility into Ant or Maven?
Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 252

Have you taken a look at Leiningen? It's a build tool for Clojure that's very easy to use and wraps up Maven under the hood (I'm not sure of the exact details - I'm an ant guy, not a Maven guy). Specific things Leiningen can do include running tests, compiling Clojure code, packaging it into a JAR file and so on.
Chris Houser

Joined: Feb 07, 2011
Posts: 22

Leiningen is a solid recommendation. For a more purely maven approach, see
I agree. Here's the link:
subject: Rewriting Java code in Clojure and compiling it
Similar Threads
Benefits of Learning Clojure?
How to implement a "data model"
External jars and clojure
Will Clojure be popular among Java programmers?
Performance and Scalability