Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 123 lines (120 sloc) 6.927 kb
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
1 ;; This is an annotated example of the options that may be set in a
2 ;; project.clj file. It is a fairly contrived example in order to
3 ;; cover all options exhaustively; it shouldn't be considered a
19b4464 @technomancy Rework some of sample.project.clj.
authored
4 ;; representative configuration. For a more detailed explanation of
5 ;; some of the terms run "lein help tutorial".
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
6
7 ;; The project is named "sample", and its group-id is "org.example".
8 (defproject org.example/sample "1.0.0-SNAPSHOT" ; version "1.0.0-SNAPSHOT"
3e7f75e @technomancy Mention unquote in sample.project.clj
authored
9 ;; Beyond this point you may prepend a form with unquote, or ~, to eval it.
10
19b4464 @technomancy Rework some of sample.project.clj.
authored
11 ;; The descrption text is searchable from repositories like Clojars.
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
12 :description "A sample project"
13 :url "http://example.org/sample-clojure-project"
3b44549 @michalmarczyk Documented :mailing-list and :license in sample.project.clj.
michalmarczyk authored
14 ;; The mailing list of the project. If the project has multiple mailing
15 ;; lists, use the :mailing-lists key (bound to a seq of mailing list
16 ;; descriptions as below).
17 :mailing-list {:name "sample mailing list"
18 :archive "http://example.org/sample-mailing-list-archives"
c43ee75 @technomancy Trim long lines.
authored
19 :other-archives ["http://example.org/sample-list-archive2"
20 "http://example.org/sample-list-archive3"]
3b44549 @michalmarczyk Documented :mailing-list and :license in sample.project.clj.
michalmarczyk authored
21 :post "list@example.org"
22 :subscribe "list-subscribe@example.org"
23 :unsubscribe "list-unsubscribe@example.org"}
24 ;; The project's license. :distribution should be :repo or :manual;
25 ;; :repo means it is ok for public repositories to host this project's
19b4464 @technomancy Rework some of sample.project.clj.
authored
26 ;; artifacts. A seq of :licenses is also supported.
3b44549 @michalmarczyk Documented :mailing-list and :license in sample.project.clj.
michalmarczyk authored
27 :license {:name "Eclipse Public License - v 1.0"
28 :url "http://www.eclipse.org/legal/epl-v10.html"
29 :distribution :repo
30 :comments "same as Clojure"}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
31 ;; Dependencies are listed as [group-id/name version].
32 :dependencies [[org.clojure/clojure "1.1.0"]
33 [org.clojure/clojure-contrib "1.1.0"]
fa2b1cc @technomancy Fix sample.project.clj typo.
authored
34 [org.jclouds/jclouds "1.0-RC6" :classifier "jdk15"]
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
35 [log4j "1.2.15" :exclusions [javax.mail/mail
36 javax.jms/jms
37 com.sun.jdmk/jmxtools
38 com.sun.jmx/jmxri]]]
e30a38d @technomancy Skip fetching deps unnecessarily when :checksum-deps is set.
authored
39 ;; Dev dependencies are intended for use only during
40 ;; development. Projects that depend on this project will not pull
41 ;; in its dev-dependencies, and they won't be included in the uberjar.
42 :dev-dependencies [[org.clojure/swank-clojure "1.2.1"]]
43 ;; Only re-fetch dependencies when they change in project.clj or
44 ;; when :library-path directory is empty.
45 :checksum-deps true
a466709 @technomancy Minor cleanup of :min-lein-version functions.
authored
46 ;; Warns users of earlier versions of Leiningen.
47 :min-lein-version "1.3.0"
3c86ca5 @technomancy Implicitly clean lib/ before running deps. Fixes #61.
authored
48 ;; Before fetching dependencies, the contents of the lib/ directory
49 ;; will get deleted unless this is set to true.
50 :disable-implicit-clean false
c4271c0 @technomancy Switch off :clean-non-project-classes by default. Fixes #141.
authored
51 ;; Delete .class files that do not have a correspoinding package in
52 ;; the src/ directory. Workaround for Clojure bug CLJ-322. Causes problems
b4943e1 @technomancy Allow :clean-non-project-classes to be a seq of regexes.
authored
53 ;; with protocols in upstream libraries; false by default. Set to
54 ;; true to delete all non-project classes or set to a seq of regexes
55 ;; to only delete class files that match one of the regexes.
c4271c0 @technomancy Switch off :clean-non-project-classes by default. Fixes #141.
authored
56 :clean-non-project-classes true
19b4464 @technomancy Rework some of sample.project.clj.
authored
57 ;; Load these namespaces on startup to pick up hooks from them. Hooks
58 ;; generally come from plugins, but may be included in your project source.
b5cb0cb @technomancy Don't load hooks unless they're specified in project.clj.
authored
59 :hooks [leiningen.hooks.difftest]
ab0b885 @technomancy Mention :test-selectors in sample.project.clj.
authored
60 ;; Predicates to determine whether to run a test or not. See tutorial.
61 :test-selectors {:default (fn [t] (not (or (:integration v) (:regression v))))
62 :integration :integration
63 :regression :regression}
b5cb0cb @technomancy Don't load hooks unless they're specified in project.clj.
authored
64 ;; Set this to true to search the classpath for hooks. Will load all
65 ;; namespaces matching leiningen.hooks.*. Warning: this will cause
66 ;; Leiningen to start slowly, especially with many dependencies.
67 :implicit-hooks false
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
68 ;; These namespaces will be AOT-compiled. Needed for gen-class and
69 ;; other Java interop functionality. :namespaces is an alias for this.
6ca18c8 @technomancy Tighten up regex support in :aot declaration with a list comprehension.
authored
70 ;; Put a regex here to compile all namespaces whose names match.
15ff6b1 @technomancy A few doc changes.
authored
71 :aot [org.example.sample]
c52f044 @technomancy Documentation updates preparing for 1.3.1.
authored
72 ;; The -main function in this namespace will be run at launch if you
73 ;; create an uberjar. Repl sessions will start in this namespace as well.
1ee9d5d @technomancy Allow :main to not trigger AOT with :skip-aot metadata.
authored
74 ;; Set :skip-aot metadata on this symbol to use it for other things like the
75 ;; run task or shell wrappers without bringing in AOT.
c865d4d @technomancy Fix :main example in sample.project.clj.
authored
76 :main org.example.sample
2247d67 @technomancy Rename :init-script to :repl-init-script; remove global-init-script.
authored
77 ;; This will get loaded automatically when you launch a repl.
78 :repl-init-script "src/main/clojure/init.clj"
cb51f6e @technomancy Support :repl-options in project.clj.
authored
79 ;; These will get passed to clojure.main/repl; see its docstring for details.
e048036 @technomancy Fix sample.project.clj documentation of :repl-options.
authored
80 :repl-options [:prompt (fn [] (print "your command, master? ") (flush))]
8f50fa7 @technomancy Allow the socket-repl host/port to be customized in project.clj.
authored
81 ;; Customize the socket the repl task listens on.
82 :repl-port 4001
83 :repl-host "0.0.0.0"
c960e5f @technomancy Allow boosting :repl-retry-limit in project.clj for slow-starting projec...
authored
84 ;; If your -main namespace takes a long time to load, it could time out the
85 ;; repl connection. Increase this to give it more time. Defaults to 100.
86 :repl-retry-limit 1000
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
87 ;; Emit warnings on all reflection calls.
88 :warn-on-reflection true
89 ;; Set this in order to only use the :repositories you list below.
90 :omit-default-repositories true
13520db @technomancy Add password-protected repository in sample.project.clj.
authored
91 :repositories {"java.net" "http://download.java.net/maven/2"
781ec86 @technomancy Fix deploy task to use :repositories for configuration.
authored
92 "snapshots" {:url "http://blueant.com/archiva/snapshots"
93 ;; Also supports :private-key and :passphrase.
94 :username "milgrim" :password "locative.1"}
95 "releases" {:url "http://blueant.com/archiva/internal"
96 :username "milgrim" :password "locative.1"}}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
97 ;; If you'd rather use a different directory structure, you can set these.
98 :source-path "src/main/clojure"
99 :library-path "target/dependency"
100 :test-path "src/test/clojure"
b0cd71b @technomancy Add :test-resources-path to sample.project.clj
authored
101 :resources-path "src/main/resource" ; non-code files included in classpath/jar
19b4464 @technomancy Rework some of sample.project.clj.
authored
102 :dev-resources-path "src/test/resource" ; added to dev classpath but not jar
103 :native-path "src/native" ; where to look for native dependencies
104 :target-dir "target/" ; where to place the project's jar file
105 :jar-name "sample.jar" ; name of the jar produced by 'lein jar'
ae72f2d @michalmarczyk Documented :jar-name & :uberjar-name in sample.project.clj.
michalmarczyk authored
106 :uberjar-name "sample-standalone.jar" ; as above for uberjar
19b4464 @technomancy Rework some of sample.project.clj.
authored
107 ;; Options to pass to java compiler for java source
108 ;; See http://ant.apache.org/manual/Tasks/javac.html
109 :javac-options {:destdir "classes/"}
110 :java-source-path "src/main/java" ; location of Java source
0e189a8 @technomancy Add :omit-source option to leave files in :source-path out of jars.
authored
111 ;; Leave the contents of :source-path out of jars (for AOT projects)
112 :omit-source true
acc9a82 @technomancy Specify what file patterns to exclude from jars. Thanks to Zehua Liu.
authored
113 ;; Files with names matching any of these patterns will be excluded from jars
114 :jar-exclusions [#"(?:^|/).svn/"]
2bda774 @technomancy Add :uberjar-exclusions to project.clj.
authored
115 ;; Same thing, but for uberjars.
116 :uberjar-exclusions [#"META-INF/DUMMY.SF"]
0966229 @technomancy Clean up make-manifest. Fixes #46.
authored
117 ;; Set arbitrary key/value pairs for the jar's manifest.
118 :manifest {"Project-awesome-level" "super-great"}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
119 ;; You can set JVM-level options here.
f732bfe @technomancy Support :eval-in-leiningen key in project.clj for plugins.
authored
120 :jvm-opts ["-Xmx1g"]
121 ;; If your project is a Leiningen plugin, set this to skip the subprocess step
122 :eval-in-leiningen false)
Something went wrong with that request. Please try again.