Created
November 11, 2009 02:14
-
-
Save ato/231501 to your computer and use it in GitHub Desktop.
proposed changes to clojure dep specification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; (based on http://github.com/technomancy/leiningen) | |
;; | |
;; Base changes: | |
;; | |
;; - defproject becomes defjar (allow multiple jars per project) | |
;; | |
;; - use group.id/jarname "1.0" instead of ["group.id" "jarname" "version"] | |
;; more clojureish and easier to type | |
;; | |
;; - drop :version keyword, version should always be required so it's | |
;; redundent to specify it as an option. | |
;; | |
(defjar clojars-web "0.1" ; group-id is optional here. Will default to something like | |
; org.clojars.username (should be settable in a per-user dot-file somewhere) | |
:description "Website frontend for clojars.org - easy open-source Clojure jar hosting" | |
:authors ["Alex Osborne"] | |
:homepage "http://clojars.org/" | |
:scm "git://github.com/ato/clojars-web.git" | |
:dependencies [org.clojure/clojure "1.0" ; always require group-id for deps? | |
org.compojure/compojure "3.0" | |
org.clojars.ato/ato-utils "0.1"]) | |
(defjar clojars-cli "0.1" | |
:namespaces [clojars.cli] ; only these namespaces will be included | |
; in the jar. | |
:dependencies [org.clojure/clojure "1.0"]) | |
;; | |
;; Here's an example of one project generating two jars | |
;; | |
(defjar org.clojure/clojure "1.0" | |
:description "A dynamic programming language that targets the JVM." | |
:authors ["Rich Hickey"] | |
:src "src/clj" | |
:javac "src/jvm") | |
(defjar org.clojure/clojure-slim "1.0" | |
:description "A non-AOT-compiled version of Clojure" | |
:aot-compile nil ; can be a vector of namespace to AOT compile. By default all | |
; namespaces to be incuded in the jar are AOT compiled. | |
:src "src/clj" | |
:javac "src/jvm") | |
;; | |
;; clojars.org tentative workflow: | |
;; | |
;; 1. Build jar using tool of choice. | |
;; 2. Make a project.clj or pom.xml (unless you already made one for your build tool) | |
;; 3. scp project.clj foobar-1.0.jar [email protected]: | |
;; | |
;; That's it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment