clojuggle /

Filename Size Date modified Message
19 B
144 B
35.1 KB
3.9 KB
6.5 KB
373 B
789 B
# Copyright (C) 2010 Seth Schroeder <>
# This file is part of clojuggle.
# clojuggle is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# clojuggle is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with clojuggle.  If not, see <>.

* Basics
  Clojuggle makes it easy to track and experiment with an extensible list of Clojure/Contrib repositories. It's a good way to quickly test code on different REPLs. This is an uncommon need.

  Leiningen is ( is the build tool to use for creating and sustaining a Clojure codebase.

* Still reading?
  Clojuggle supports these features on a per branch and project basis:
  - clone (as pull)
  - build
  - update
  - publish (to local .m2 and ~/.clojure)
  - run (for evaluating .clj files as specified in CLJ_ARGS)
  - repl

  By default the code is checked out inside the project's directory, and links to its binaries go into ~/.clojure and ~/.m2.
  Rich Hickey's primary repos are configured by default. Please see the instructions in  user.yml.example to track forked repos.

* Requirements
  - Ruby, ant, git, mvn (maven2), Java, the patience of a saint.
  - Clojure and Contrib must use branches with the same name, but not limited to new or master

* Hints
  If clojure-contrib won't publish to ~/.clojure, try 'rake clojure-contrib:$BRANCH:for_dotclojure'

* Quick start
  1.) hg clone
  2.) cd clojuggle
  3.) rake clojure:master:all clojure-contrib:master:all

* Try a repl
  4.) rake repl (uses the clojure/contrib jars in ~/.clojure)

* Evaluate a .clj file
  5.) rake clojure:new:all
  6.) echo '(println "hello, world")' > foo.clj
  7.) rake clojure:new:run CLJ_ARGS=foo.clj

* Slow start
  Each branch of each configured project supports several tasks. This leads to M x N x O tasks so Clojuggle tries to show only the relevant ones. For example, the 'update' task is hidden until after 'clone' has run.

* Tasks
** project:branch:tasks (e.g. clojure:new:pull)
   - all: WIPE (!!), pull, build, and publish locally
   - update: pull changes, clean binaries, and build
   - publish: puts project binaries in ~/.clojure and ~/.m2
   - clone: clones the remote repository and checks out a remote tracking branch
   - pull: git pull (fetch & merge remote changes to the branch)
   - clean: ant clean
   - build: ant jar
** project tasks (e.g. clojure:blast:it)
   - blast: removes project items from ~/.clojure and ~/.m2

* Configurable items
  - To add repos, copy user.yml.example to user.yml and edit per the instructions.
  - The CLOJUGGLE_WORK_DIR environment variable can be used to override where code is cloned to. The default value is the "src" folder of the clojuggle directory.
  - LOCAL_M2_REPO is consulted before using $HOME/.m2 as the local maven2 repository.

* Tested on
  - Mac OS X 10.6

* Limitations / latent TODOs
  - !!!!!!!!!!!!!!!! The wipe target makes no attempt to check for local changes. YOU WILL LOSE DATA. The return value from 'git status' should be inspected...
  - Clean builds always happen. Builds should only happen when files change...
  - Clojure and Contrib have to be on the same branch. Parameters for each should be accepted.
  - rake update => updates all configured and checked out repos

* tl;dr
  Use Leiningen. Technomancy rocks.