Skip to content
Newer
Older
100644 102 lines (99 sloc) 5.46 KB
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
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
4 ;; representative configuration.
5
6 ;; The project is named "sample", and its group-id is "org.example".
7 (defproject org.example/sample "1.0.0-SNAPSHOT" ; version "1.0.0-SNAPSHOT"
3e7f75e @technomancy Mention unquote in sample.project.clj
authored Jun 24, 2010
8 ;; Beyond this point you may prepend a form with unquote, or ~, to eval it.
9
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
10 ;; The descrption is used to allow searchability when uploaded to Clojars.
11 :description "A sample project"
12 ;; The URL is also metadata that Clojars uses.
13 :url "http://example.org/sample-clojure-project"
3b44549 @michalmarczyk Documented :mailing-list and :license in sample.project.clj.
michalmarczyk authored Jun 17, 2010
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 Jul 12, 2010
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 Jun 17, 2010
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
26 ;; artifacts. :licence can be used in place of :license, and for projects
27 ;; which allow their users to choose among several licenses, :licenses
28 ;; and :licences keys are supported. NB. all licenses mentioned in
29 ;; project.clj under any of the supported keys will be put in pom.xml.
30 :license {:name "Eclipse Public License - v 1.0"
31 :url "http://www.eclipse.org/legal/epl-v10.html"
32 :distribution :repo
33 :comments "same as Clojure"}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
34 ;; Dependencies are listed as [group-id/name version].
35 :dependencies [[org.clojure/clojure "1.1.0"]
36 [org.clojure/clojure-contrib "1.1.0"]
fa2b1cc @technomancy Fix sample.project.clj typo.
authored Aug 23, 2010
37 [org.jclouds/jclouds "1.0-RC6" :classifier "jdk15"]
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
38 [log4j "1.2.15" :exclusions [javax.mail/mail
39 javax.jms/jms
40 com.sun.jdmk/jmxtools
41 com.sun.jmx/jmxri]]]
a466709 @technomancy Minor cleanup of :min-lein-version functions.
authored Aug 23, 2010
42 ;; Warns users of earlier versions of Leiningen.
43 :min-lein-version "1.3.0"
3c86ca5 @technomancy Implicitly clean lib/ before running deps. Fixes #61.
authored Jun 21, 2010
44 ;; Before fetching dependencies, the contents of the lib/ directory
45 ;; will get deleted unless this is set to true.
46 :disable-implicit-clean false
b5cb0cb @technomancy Don't load hooks unless they're specified in project.clj.
authored Jul 30, 2010
47 ;; Load these namespaces on startup to pick up hooks from
48 ;; them. Hooks are generally included in plugins.
49 :hooks [leiningen.hooks.difftest]
50 ;; Set this to true to search the classpath for hooks. Will load all
51 ;; namespaces matching leiningen.hooks.*. Warning: this will cause
52 ;; Leiningen to start slowly, especially with many dependencies.
53 :implicit-hooks false
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
54 ;; Dev dependencies are intended for use only during
55 ;; development. Projects that depend on this project will not pull
56 ;; in its dev-dependencies, and they won't be included in the uberjar.
57 :dev-dependencies [[org.clojure/swank-clojure "1.2.1"]]
58 ;; These namespaces will be AOT-compiled. Needed for gen-class and
59 ;; other Java interop functionality. :namespaces is an alias for this.
6ca18c8 @technomancy Tighten up regex support in :aot declaration with a list comprehension.
authored Sep 7, 2010
60 ;; Put a regex here to compile all namespaces whose names match.
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
61 :aot [org.example.sample.SampleClass]
c52f044 @technomancy Documentation updates preparing for 1.3.1.
authored Sep 5, 2010
62 ;; The -main function in this namespace will be run at launch if you
63 ;; create an uberjar. Repl sessions will start in this namespace as well.
c865d4d @technomancy Fix :main example in sample.project.clj.
authored Aug 22, 2010
64 :main org.example.sample
2247d67 @technomancy Rename :init-script to :repl-init-script; remove global-init-script.
authored Aug 8, 2010
65 ;; This will get loaded automatically when you launch a repl.
66 :repl-init-script "src/main/clojure/init.clj"
cb51f6e @technomancy Support :repl-options in project.clj.
authored Nov 19, 2010
67 ;; These will get passed to clojure.main/repl; see its docstring for details.
68 :repl-options {:prompt (constantly "your command, master? ")}
8f50fa7 @technomancy Allow the socket-repl host/port to be customized in project.clj.
authored Aug 29, 2010
69 ;; Customize the socket the repl task listens on.
70 :repl-port 4001
71 :repl-host "0.0.0.0"
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
72 ;; Emit warnings on all reflection calls.
73 :warn-on-reflection true
74 ;; Set this in order to only use the :repositories you list below.
75 :omit-default-repositories true
13520db @technomancy Add password-protected repository in sample.project.clj.
authored Oct 22, 2010
76 :repositories {"java.net" "http://download.java.net/maven/2"
77 "private" {:url "http://private.repo"
78 :username "milgrim"
79 :password "locative.1"}}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
80 ;; If you'd rather use a different directory structure, you can set these.
81 :source-path "src/main/clojure"
82 :library-path "target/dependency"
83 :test-path "src/test/clojure"
b0cd71b @technomancy Add :test-resources-path to sample.project.clj
authored Sep 21, 2010
84 :resources-path "src/main/resource" ; non-code files included in classpath/jar
85 :test-resources-path "src/test/resource" ; added to classpath but not in jar
c865d4d @technomancy Fix :main example in sample.project.clj.
authored Aug 23, 2010
86 :native-path "src/native" ; where to look for native dependencies
87 :jar-dir "target/" ; where to place the project's jar file
88 :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 Jun 24, 2010
89 :uberjar-name "sample-standalone.jar" ; as above for uberjar
0e189a8 @technomancy Add :omit-source option to leave files in :source-path out of jars.
authored Aug 16, 2010
90 ;; Leave the contents of :source-path out of jars (for AOT projects)
91 :omit-source true
acc9a82 @technomancy Specify what file patterns to exclude from jars. Thanks to Zehua Liu.
authored Sep 23, 2010
92 ;; Files with names matching any of these patterns will be excluded from jars
93 :jar-exclusions [#"(?:^|/).svn/"]
2bda774 @technomancy Add :uberjar-exclusions to project.clj.
authored Nov 20, 2010
94 ;; Same thing, but for uberjars.
95 :uberjar-exclusions [#"META-INF/DUMMY.SF"]
0966229 @technomancy Clean up make-manifest. Fixes #46.
authored Aug 8, 2010
96 ;; Set arbitrary key/value pairs for the jar's manifest.
97 :manifest {"Project-awesome-level" "super-great"}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored Jun 5, 2010
98 ;; You can set JVM-level options here.
f732bfe @technomancy Support :eval-in-leiningen key in project.clj for plugins.
authored Oct 24, 2010
99 :jvm-opts ["-Xmx1g"]
100 ;; If your project is a Leiningen plugin, set this to skip the subprocess step
101 :eval-in-leiningen false)
Something went wrong with that request. Please try again.