Skip to content

Instantly share code, notes, and snippets.

View lrenn's full-sized avatar

Luke Renn lrenn

  • Philadelphia, PA
View GitHub Profile
<ivysettings>
<settings defaultResolver="main" />
<resolvers>
<chain name="main" returnFirst="true">
<url name="parspro-public">
<ivy
pattern="http://repo.parspro.com/parspro-repository/advanced/[organisation]/[module]/ivys/ivy-[revision].xml"
/>
<artifact
pattern="http://repo.parspro.com/parspro-repository/advanced/[organisation]/[module]/jars/[artifact]-[revision].[ext]"
@lrenn
lrenn / gist:2156195
Created March 22, 2012 05:01
Continuing to fight the good fight :) Leiningen resolving via Apache Ivy.
,-[lrenn@cygnus]-[~/src/leiningen/leiningen-core]-[0]-[9059]
`-[:)] % lein test
Testing leiningen.bluuugh
Testing leiningen.core.test.classpath
:: loading settings :: url = jar:file:/home/lrenn/src/leiningen/leiningen-core/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: loading settings :: url = jar:file:/home/lrenn/src/leiningen/leiningen-core/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: vine-adhoc#vine-adhoc;0.0.1
confs: [default]
(ns bake.notify
(:use [bake.core :only [os-name]]
[cake :only [*config* *current-task*]]
[clojure.java.shell :only [sh]]))
(def growl-format "growlnotify -s \"cake +task+\" -m \"+message+\"")
(def libnotify-format "notify-send \"cake +task+\" \"+message+\"")
(defn default-format []
(if (= "linux" (os-name))
@lrenn
lrenn / gist:704550
Created November 18, 2010 02:40
cake compile
,-[lrenn@cygnus]-[~/src/clojars-web]-[0]-[9016]
`-[:)] % cake clean
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/clean
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/compile
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/compile-native
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/deps
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/pom
[clean] Deleting /home/lrenn/src/clojars-web/classes
[clean] Deleting directory /home/lrenn/src/clojars-web/classes
,-[lrenn@cygnus]-[~/src/clojars-web]-[0]-[9017]
@lrenn
lrenn / gist:664511
Created November 5, 2010 17:44
Cake Compile Failure
,-[lrenn@cygnus]-[~/src/clojars-web]-[20]-[9372]
`-[:(] % cake clean
[clean] Deleting /home/lrenn/src/clojars-web/clojars-web-0.6.0-standalone.jar
[clean] Deleting /home/lrenn/src/clojars-web/clojars-web-0.6.0.jar
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/clean
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/compile
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/compile-native
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/deps
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/jar
[clean] Deleting /home/lrenn/src/clojars-web/.cake/run/uberjar
(defn baked* [loader ns-forms bindings body]
(with-classloader loader
(let [body `(~'let ~(quote-if odd? bindings) ~@body)
clj (.loadClass loader "clojure.main")
signature (into-array Class [(class (into-array String []))])
method (.getDeclaredMethod clj "main" signature)
args (into-array Object [(into-array String ["-e" (pr-str [ns-forms body])])])]
(.invoke method clj args))))
(defmacro baked
(def default-repositories
[["clojure" "http://build.clojure.org/releases"]
["clojure-snapshots" "http://build.clojure.org/snapshots"]
["clojars" "http://clojars.org/repo/"]
["maven" {:type "ibiblio"
:m2compatible "true"}]
["shared" {:type "filesystem"
:ivy-pattern "${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}"
:artifact-pattern "${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}"}]
["local" {:type "filesystem"
["main" {:type "chain" :dual "true"
:resolvers ["shared" "cake-defaults" "project"]}]
to make projects first:
["main" {:resolvers ["shared" "project" "cake-defaults"]}
@lrenn
lrenn / gist:656271
Created October 31, 2010 07:52
Icing Example
,-[lrenn@cygnus]-[~/src/icing]-[0]-[9075]
`-[:)] % cake killall
,-[lrenn@cygnus]-[~/src/icing]-[0]-[9076]
`-[:)] % ls
example.clj
,-[lrenn@cygnus]-[~/src/icing]-[0]-[9077]
`-[:)] % cat example.clj
(ns
^{:project {:dependencies [[clojure "1.2.0"]
[hiccup "latest.integration"]]
,-[lrenn@cygnus]-[~/src/cake]-[0]-[5764]
`-[:)] % cake clean
/usr/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir': File exists - /home/lrenn/.m2/repository/cake/cake/0.5.0-SNAPSHOT (Errno::EEXIST)
from /usr/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir'
from /usr/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels) in mkdir_p'
from /usr/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
from /usr/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'
from /usr/lib/ruby/1.9.1/fileutils.rb:201:in `each'
from /usr/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
from /home/lrenn/bin/cake:241:in `download'