permaculture playing cards*
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
Author

Rewriting Java code in Clojure and compiling it

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi,
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)?
http://clojure.org/compilation
Any special points I should pay attention to?
Clojure provides compilation facility, for example:

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

Joined: Feb 09, 2011
Posts: 252
    
    5

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
author
Greenhorn

Joined: Feb 07, 2011
Posts: 22

Leiningen is a solid recommendation. For a more purely maven approach, see https://github.com/talios/clojure-maven-plugin
 
Don't get me started about those stupid light bulbs.
 
subject: Rewriting Java code in Clojure and compiling it
 
Similar Threads
External jars and clojure
Will Clojure be popular among Java programmers?
Performance and Scalability
Benefits of Learning Clojure?
How to implement a "data model"