I'll add my 2 cents worth. I've come from a Java development
background to Clojure. A couple of years ago our company migrated from
Ant to Maven. At first I really really hated it. I found it difficult
to make it do what I wanted it to do. Nowadays, though, it is my build
tool of choice.

The turning point was when I realized that the key to using Maven is
understanding the Maven model - understanding how Maven wants to
build. You don't tell Maven what to do. You just put the files in the
places Maven expects, and Maven then _knows_ what to do. My rule of
thumb is: if I'm spending a lot of time tweaking configuration and
overriding defaults in the pom file then I'm probably doing it wrong.

When I started programming in Clojure I immediately looked for a Maven
plugin to build Clojure projects. The first project I worked on I did
using the plugin. For my next Clojure project I decided to give
Leiningen a spin. Initially I was very impressed. It was easy to get a
project up and running, easy to build, easy to run tests, easy to run
a swank server etc. For a couple of weeks I was very happy. But.....

I finally hit a point where Leiningen was no longer working for me. My
current project has a Swing GUI, built using Matisse (the Netbeans GUI
builder). I couldn't find a way to build the Swing portion and the
Clojure portion together using Leiningen. I also couldn't find a way
to divide my project up into different sub-modules with one build
(maybe I'm guilty of trying to use Leiningen like I use Maven). In any
case, I ended up converting the project to use Maven.

Maven has a steep learning curve, but once you get it, it's incredibly
powerful.

"The philosophy of Tai Chi Chuan is that if one uses hardness to
resist violent force, then both sides are certain to be injured at
least to some degree. Such injury, according to tai chi theory, is a
natural consequence of meeting brute force with brute force. Instead,
students are taught not to directly fight or resist an incoming force,
but to meet it in softness and follow its motion while remaining in
physical contact until the incoming force of attack exhausts itself or
can be safely redirected, meeting yang with yin." (http://
en.wikipedia.org/wiki/Tai_chi_chuan)

If you fight with Maven, you will lose. If you meet it in softness and
follow its motion you will attain build enlightenment...

;-)

FInally, I agree with Stuart that polyglot Maven could / should be the
way forward. I don't really wrestle with pom files much manually
anyway since Netbeans does a very good job of automatically updating
them. But Leiningen has given me a taste of writing build files in
Clojure, so I will definitely be investigating the polyglot option
soon.

To learn more about Maven I would recommend
http://www.sonatype.com/books/mvnref-book/reference/public-book.html
and http://www.sonatype.com/books/mvnex-book/reference/public-book.html

On Mar 5, 6:01 pm, James Reeves <weavejes...@googlemail.com> wrote:
> On Mar 5, 11:17 am, Stuart Sierra <the.stuart.sie...@gmail.com> wrote:
>
> > Maven supports a wide range of development/deployment models already.
> > Whatever you want to do (including compile/test/run Clojure code)
> > there's a plugin for that.  Why recreate all this functionality in
> > Leiningen?
>
> Most of the time, I won't need the wide range of functionality that
> Maven supports. For the most common tasks, such as compiling and
> packaging, Leiningen is the better build tool. It's conceptually
> simpler, more understandable, and easier to extend. I'd rather use a
> build tool that covers 80% of tasks well, than a tool that covers 95%
> poorly.
>
> - James

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to