Skip to content
This repository
Browse code

Mention new `:dependencies` settings in sample.project.clj. Fixes #501.

[ci skip]
  • Loading branch information...
commit 7c82e59acf25cbe9545f87a0276350e1be129403 1 parent a4821e0
Phil Hagelberg authored April 09, 2012
1  NEWS.md
Source Rendered
@@ -11,6 +11,7 @@
11 11
 * Automatically activate offline profile when needed.
12 12
 * Honor $http_proxy environment variable. (Juergen Hoetzel)
13 13
 * Allow arbitrary :filespecs to be included in jars.
  14
+* Let custom :prep-tasks be specified in project.clj.
14 15
 * Include :java-source-paths and dev/test deps in pom. (Nelson Morris)
15 16
 * Add offline profile.
16 17
 * Prevent project JVMs from outlasting Leiningen's process. (Colin Jones)
15  sample.project.clj
@@ -30,10 +30,10 @@
30 30
             :comments "same as Clojure"}
31 31
   ;; Dependencies are listed as [group-id/name version].
32 32
   :dependencies [[org.clojure/clojure "1.3.0"]
33  
-                 [org.jclouds/jclouds "1.0" :classifier "jdk15"]
  33
+                 [org.jclouds/jclouds "1.0" :classifier "jdk15" :scope "test"]
34 34
                  [net.sf.ehcache/ehcache "2.3.1" :extension "pom"]
35  
-                 [log4j "1.2.15" :exclusions [javax.mail/mail
36  
-                                              javax.jms/jms
  35
+                 [log4j "1.2.15" :exclusions [[javax.mail/mail :extension "jar"]
  36
+                                              [javax.jms/jms :classifier "*"]
37 37
                                               com.sun.jdmk/jmxtools
38 38
                                               com.sun.jmx/jmxri]]]
39 39
   ;; Global exclusions are applied across the board, as an alternative
@@ -52,8 +52,17 @@
52 52
              :debug {:debug true
53 53
                      :injections [(prn (into {} (System/getProperties)))]}
54 54
              :1.4 {:dependencies [[org.clojure/clojure "1.4.0-alpha1"]]}}
  55
+  ;; Support project-specific task aliases. These are interpreted in
  56
+  ;; the same way as command-line arguments to the lein command. If
  57
+  ;; the alias points to a vector, it uses partial application. For
  58
+  ;; example, "lein with-magic run -m hi.core" would be equivalent to
  59
+  ;; "lein assoc :magic true run -m hi.core".
55 60
   :aliases {"launch" "run"
56 61
             "with-magic" ["assoc" ":magic" "true"]}
  62
+  ;; Normally Leiningen runs the javac and compile tasks before
  63
+  ;; calling any eval-in-project code, but you can override this with
  64
+  ;; the :prep-tasks key to do other things like compile protocol buffers.
  65
+  :prep-tasks ["protoc" "compile"]
57 66
   ;; Warns users of earlier versions of Leiningen.
58 67
   :min-lein-version "2.0.0"
59 68
   ;; Paths to include on the classpath from each project in the

0 notes on commit 7c82e59

Please sign in to comment.
Something went wrong with that request. Please try again.