Skip to content

Instantly share code, notes, and snippets.

@lrenn
Created October 31, 2010 07:52
Show Gist options
  • Save lrenn/656271 to your computer and use it in GitHub Desktop.
Save lrenn/656271 to your computer and use it in GitHub Desktop.
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"]]
:entry lorem}}
example
(:use hiccup.core))
(defn lorem
[args]
(println (html [:span {:class "lorem"} "ipsom"])))
,-[lrenn@cygnus]-[~/src/icing]-[0]-[9078]
`-[:)] % cake icing example.clj
[icing] :: Ivy 2.2.0-rc1 - 20100629224905 :: http://ant.apache.org/ivy/ ::
[icing] :: loading settings :: url = jar:file:/home/lrenn/src/cake/lib/ivy-2.2.0-rc1.jar!/org/apache/ivy/core/settings/ivysettings.xml
Warning: default mime table not found: /opt/java/lib/content-types.properties
[icing] :: resolving dependencies :: icing#icing;0.0.1-SNAPSHOT
[icing] confs: [master, default, devel]
[icing] found org.clojure#clojure;1.2.0 in public
[icing] found hiccup#hiccup;0.3.0 in clojars
[icing] [0.3.0] hiccup#hiccup;latest.integration
[icing] found org.clojure#clojure-contrib;1.2.0 in clojure
[icing] :: resolution report :: resolve 2406ms :: artifacts dl 5ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| master | 0 | 0 | 0 | 0 || 0 | 0 |
| default | 3 | 1 | 0 | 0 || 3 | 0 |
| devel | 0 | 0 | 0 | 0 || 0 | 0 |
---------------------------------------------------------------------
<span class="lorem">ipsom</span>
,-[lrenn@cygnus]-[~/src/icing]-[0]-[9079]
`-[:)] % ls
example.clj
Cake resolved the dependencies from the meta data, setup a new classloader using the jars from the ivy cache (they weren't copied to a lib folder or anything), the loaded the script and ran the entry function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment