This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
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 Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 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: 3479

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: 272
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rewriting Java code in Clojure and compiling it