Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 116 lines (113 sloc) 6.45 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]]]
a466709 @technomancy Minor cleanup of :min-lein-version functions.
authored
39 ;; Warns users of earlier versions of Leiningen.
40 :min-lein-version "1.3.0"
3c86ca5 @technomancy Implicitly clean lib/ before running deps. Fixes #61.
authored
41 ;; Before fetching dependencies, the contents of the lib/ directory
42 ;; will get deleted unless this is set to true.
43 :disable-implicit-clean false
c4271c0 @technomancy Switch off :clean-non-project-classes by default. Fixes #141.
authored
44 ;; Delete .class files that do not have a correspoinding package in
45 ;; the src/ directory. Workaround for Clojure bug CLJ-322. Causes problems
19b4464 @technomancy Rework some of sample.project.clj.
authored
46 ;; with protocols in upstream libraries; false by default.
c4271c0 @technomancy Switch off :clean-non-project-classes by default. Fixes #141.
authored
47 :clean-non-project-classes true
19b4464 @technomancy Rework some of sample.project.clj.
authored
48 ;; Load these namespaces on startup to pick up hooks from them. Hooks
49 ;; 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
50 :hooks [leiningen.hooks.difftest]
ab0b885 @technomancy Mention :test-selectors in sample.project.clj.
authored
51 ;; Predicates to determine whether to run a test or not. See tutorial.
52 :test-selectors {:default (fn [t] (not (or (:integration v) (:regression v))))
53 :integration :integration
54 :regression :regression}
b5cb0cb @technomancy Don't load hooks unless they're specified in project.clj.
authored
55 ;; Set this to true to search the classpath for hooks. Will load all
56 ;; namespaces matching leiningen.hooks.*. Warning: this will cause
57 ;; Leiningen to start slowly, especially with many dependencies.
58 :implicit-hooks false
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
59 ;; Dev dependencies are intended for use only during
60 ;; development. Projects that depend on this project will not pull
61 ;; in its dev-dependencies, and they won't be included in the uberjar.
62 :dev-dependencies [[org.clojure/swank-clojure "1.2.1"]]
63 ;; These namespaces will be AOT-compiled. Needed for gen-class and
64 ;; other Java interop functionality. :namespaces is an alias for this.
6ca18c8 @technomancy Tighten up regex support in :aot declaration with a list comprehension.
authored
65 ;; Put a regex here to compile all namespaces whose names match.
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
66 :aot [org.example.sample.SampleClass]
c52f044 @technomancy Documentation updates preparing for 1.3.1.
authored
67 ;; The -main function in this namespace will be run at launch if you
68 ;; 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
69 ;; Set :skip-aot metadata on this symbol to use it for other things like the
70 ;; run task or shell wrappers without bringing in AOT.
c865d4d @technomancy Fix :main example in sample.project.clj.
authored
71 :main org.example.sample
2247d67 @technomancy Rename :init-script to :repl-init-script; remove global-init-script.
authored
72 ;; This will get loaded automatically when you launch a repl.
73 :repl-init-script "src/main/clojure/init.clj"
cb51f6e @technomancy Support :repl-options in project.clj.
authored
74 ;; These will get passed to clojure.main/repl; see its docstring for details.
e048036 @technomancy Fix sample.project.clj documentation of :repl-options.
authored
75 :repl-options [:prompt (fn [] (print "your command, master? ") (flush))]
8f50fa7 @technomancy Allow the socket-repl host/port to be customized in project.clj.
authored
76 ;; Customize the socket the repl task listens on.
77 :repl-port 4001
78 :repl-host "0.0.0.0"
c960e5f @technomancy Allow boosting :repl-retry-limit in project.clj for slow-starting projec...
authored
79 ;; If your -main namespace takes a long time to load, it could time out the
80 ;; repl connection. Increase this to give it more time. Defaults to 100.
81 :repl-retry-limit 1000
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
82 ;; Emit warnings on all reflection calls.
83 :warn-on-reflection true
84 ;; Set this in order to only use the :repositories you list below.
85 :omit-default-repositories true
13520db @technomancy Add password-protected repository in sample.project.clj.
authored
86 :repositories {"java.net" "http://download.java.net/maven/2"
87 "private" {:url "http://private.repo"
88 :username "milgrim"
89 :password "locative.1"}}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
90 ;; If you'd rather use a different directory structure, you can set these.
91 :source-path "src/main/clojure"
92 :library-path "target/dependency"
93 :test-path "src/test/clojure"
b0cd71b @technomancy Add :test-resources-path to sample.project.clj
authored
94 :resources-path "src/main/resource" ; non-code files included in classpath/jar
19b4464 @technomancy Rework some of sample.project.clj.
authored
95 :dev-resources-path "src/test/resource" ; added to dev classpath but not jar
96 :native-path "src/native" ; where to look for native dependencies
97 :target-dir "target/" ; where to place the project's jar file
98 :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
99 :uberjar-name "sample-standalone.jar" ; as above for uberjar
19b4464 @technomancy Rework some of sample.project.clj.
authored
100 ;; Options to pass to java compiler for java source
101 ;; See http://ant.apache.org/manual/Tasks/javac.html
102 :javac-options {:destdir "classes/"}
103 :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
104 ;; Leave the contents of :source-path out of jars (for AOT projects)
105 :omit-source true
acc9a82 @technomancy Specify what file patterns to exclude from jars. Thanks to Zehua Liu.
authored
106 ;; Files with names matching any of these patterns will be excluded from jars
107 :jar-exclusions [#"(?:^|/).svn/"]
2bda774 @technomancy Add :uberjar-exclusions to project.clj.
authored
108 ;; Same thing, but for uberjars.
109 :uberjar-exclusions [#"META-INF/DUMMY.SF"]
0966229 @technomancy Clean up make-manifest. Fixes #46.
authored
110 ;; Set arbitrary key/value pairs for the jar's manifest.
111 :manifest {"Project-awesome-level" "super-great"}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
112 ;; You can set JVM-level options here.
f732bfe @technomancy Support :eval-in-leiningen key in project.clj for plugins.
authored
113 :jvm-opts ["-Xmx1g"]
114 ;; If your project is a Leiningen plugin, set this to skip the subprocess step
115 :eval-in-leiningen false)
Something went wrong with that request. Please try again.