Awesomeness. On Wed, Nov 18, 2009 at 2:29 AM, Phil Hagelberg <p...@hagelb.org> wrote:
> > I'm pleased to announce the initial release of Leiningen. > > Leiningen is a build tool for Clojure designed to not set your hair on > fire. > > Building Clojure projects with tools designed for Java can be an > exercise in frustration. If you use Ant, you end up copying around a > lot of the same tasks around between XML files on all your projects; > there's a lot of repetition. Maven avoids repetition, but provides > very little transparency into what's really going on behind the scenes > and forces you to become a Maven expert to script a nontrivial > build. Either way you end up writing far more XML than is necessary. > > With Leiningen, your build is described using Clojure. You can put any > code you like in your project.clj file; the only requirement is that > it includes a call to defproject. You can define your own tasks in > there if you need to, but the majority of projects should be able to > get by on the tasks that are provided with Leiningen. If you do find a > common task that you need to add, you can implement it as a plugin > rather than copying and pasting among each of your projects. > > Projects are defined with Clojure syntax, (not XML!) in project.clj: > > (defproject leiningen "0.5.0" > :description "A build tool designed not to set your hair on fire." > :main leiningen.core > :dependencies [[org.clojure/clojure "1.1.0-alpha-SNAPSHOT"] > [org.clojure/clojure-contrib "1.0-SNAPSHOT"] > [ant/ant-launcher "1.6.2"] > [org.apache.maven/maven-ant-tasks "2.0.10"]] > :dev-dependencies [[org.clojure/swank-clojure "1.0"]]) > > > A number of tasks are provided: > > $ lein deps # install dependencies in lib/ > > $ lein test [PRED] # run the project's tests, optionally filtered on > PRED > > $ lein compile # ahead-of-time compile into classes/ > > $ lein repl # launch a REPL with the project classpath configured > > $ lein clean # remove all build artifacts > > $ lein jar # create a jar of the project > > $ lein uberjar # create a standalone jar that contains all dependencies > > $ lein pom # output a pom.xml file for interop with Maven > > $ lein install # install in local repo (currently requires mvn) > > $ lein help [TASK] # show a list of tasks or help for a given TASK > > Leiningen is extensible, you can define new tasks in project.clj or in > plugins. Add your plugin as a dev-dependency of your project, and you'll > be able to call "lein $YOUR_COMMAND". See the lein-swank directory for > an example of a plugin. > > To install simply download the shell script, place it somewhere on your > $PATH, and run "lein self-install": > > http://github.com/technomancy/leiningen/raw/master/bin/lein > > Many people have expressed frustration at trying to use a tool designed > for Java with their Clojure projects, especially when dealing with > dependencies. I hope this can move things forward and ease the > pain. Note that it's still a very young project, (started about two > weeks ago), but in classic Clojure fashion it is able to leverage a lot > of functionality from other JVM tools. > > Please try it out and let me know how it works for your project! > > thanks, > Phil > > Bonus: Leiningen also integrates with the Clojars open-source > clojure-specific repository coming soon at http://clojars.org. > > -- > 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<clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- 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