Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 162 lines (159 sloc) 9.307 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].
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
32 :dependencies [[org.clojure/clojure "1.3.0"]
33 [org.jclouds/jclouds "1.0" :classifier "jdk15"]
9254c04 @technomancy Document :type in :dependencies in sample.project.clj.
authored
34 [net.sf.ehcache/ehcache "2.3.1" :type "pom"]
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]]]
ac9f135 @joegallo Add global :exclusions
joegallo authored
39 ;; Global exclusions are applied across the board, as an alternative
40 ;; to duplication for multiple depedencies with the same excluded libraries.
41 :exclusions [org.apache.poi/poi
42 org.apache.poi/poi-ooxml]
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
43 :plugins [[lein-pprint "1.1.1"]
44 [lein-assoc "0.1.0"]]
45 ;; Each active profile gets merged into the project map. The :dev
46 ;; and :user profiles are active by default, but the latter should be
47 ;; looked up in ~/.lein/profiles.clj rather than set in project.clj.
48 ;; Use the with-profiles higher-order task to run a task with a
49 ;; different set of active profiles.
50 :profiles {:dev {:resource-paths ["dummy-data"]
51 :dependencies [[clj-stacktrace "0.2.4"]]}
52 :debug {:debug true
21d9917 @technomancy Now :project-init is redundant with :injections.
authored
53 :injections [(prn (into {} (System/getProperties)))]}
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
54 :1.4 {:dependencies [[org.clojure/clojure "1.4.0-alpha1"]]}}
55 :aliases {"launch" "run"
56 "with-magic" ["assoc" ":magic" "true"]}
a466709 @technomancy Minor cleanup of :min-lein-version functions.
authored
57 ;; Warns users of earlier versions of Leiningen.
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
58 :min-lein-version "2.0.0"
60a8ed8 @technomancy Clarify :checkout-deps-shares in sample.project.clj.
authored
59 ;; Paths to include on the classpath from each project in the
60 ;; checkouts/ directory. (See the FAQ in the Readme for more details
61 ;; about checkout dependencies.) Set this to be a vector of
62 ;; functions that take the target project as argument. Defaults to
63 ;; [:source-path :compile-path :resources-path], but you could use
64 ;; the following to share code from the test suite:
65 :checkout-deps-shares [:source-path :test-path
66 ~(fn [p] (str (:root p) "/lib/dev/*"))]
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
67 ;; Load these namespaces on startup to pick up hooks from them.
b5cb0cb @technomancy Don't load hooks unless they're specified in project.clj.
authored
68 :hooks [leiningen.hooks.difftest]
ab0b885 @technomancy Mention :test-selectors in sample.project.clj.
authored
69 ;; Predicates to determine whether to run a test or not. See tutorial.
70 :test-selectors {:default (fn [t] (not (or (:integration v) (:regression v))))
71 :integration :integration
72 :regression :regression}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
73 ;; These namespaces will be AOT-compiled. Needed for gen-class and
74 ;; other Java interop functionality. :namespaces is an alias for this.
6ca18c8 @technomancy Tighten up regex support in :aot declaration with a list comprehension.
authored
75 ;; Put a regex here to compile all namespaces whose names match.
15ff6b1 @technomancy A few doc changes.
authored
76 :aot [org.example.sample]
c52f044 @technomancy Documentation updates preparing for 1.3.1.
authored
77 ;; The -main function in this namespace will be run at launch if you
78 ;; 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
79 ;; Set :skip-aot metadata on this symbol to use it for other things like the
6cc10bc @technomancy s/disable-implicit-clean/disable-deps-clean/. keep backwards-compat.
authored
80 ;; run task or shell wrappers without bringing in AOT if you don't need an
81 ;; executable uberjar.
c865d4d @technomancy Fix :main example in sample.project.clj.
authored
82 :main org.example.sample
1943be7 @technomancy Accept :repl-init ns in favour of :repl-init-script.
authored
83 ;; This namespace will get loaded automatically when you launch a repl.
84 :repl-init sample.repl-helper
cb51f6e @technomancy Support :repl-options in project.clj.
authored
85 ;; These will get passed to clojure.main/repl; see its docstring for details.
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
86 :reply-options [:prompt (fn [] (print "your command, master? ") (flush))]
8f50fa7 @technomancy Allow the socket-repl host/port to be customized in project.clj.
authored
87 ;; Customize the socket the repl task listens on.
88 :repl-port 4001
89 :repl-host "0.0.0.0"
c960e5f @technomancy Allow boosting :repl-retry-limit in project.clj for slow-starting projec...
authored
90 ;; If your -main namespace takes a long time to load, it could time out the
91 ;; repl connection. Increase this to give it more time. Defaults to 100.
92 :repl-retry-limit 1000
21d9917 @technomancy Now :project-init is redundant with :injections.
authored
93 ;; Forms to prepend to every form that is evaluated inside your project.
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
94 ;; Allows working around the Gilardi Scenario: http://technomancy.us/143
21d9917 @technomancy Now :project-init is redundant with :injections.
authored
95 :injections [(require 'clojure.pprint)]
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
96 ;; Emit warnings on all reflection calls.
97 :warn-on-reflection true
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
98 ;; Set this in order to only use the :repositories you list below.
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
99 :omit-default-repositories true
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
100 ;; These repositories will be searched for :dependencies and
101 ;; :plugins and will also be available to deploy to.
102 :repositories {"java.net" "http://download.java.net/maven/2"
103 "sonatype"
104 {:url "http://oss.sonatype.org/content/repositories/releases"
105 ;; If a repository contains releases only; setting :snapshots
106 ;; to false will speed up dependency checking.
107 :snapshots false
108 ;; You can also set the policies for how to handle :checksum
109 ;; failures to :fail, :warn, or :ignore. In :releases, :daily,
110 ;; :always, and :never are supported.
111 :releases {:checksum :fail :update :always}}
fc7ad70 @technomancy Add more :repositories settings details to sample project.clj.
authored
112 ;; Repositories named "snapshots" and "releases" automatically
113 ;; have their :snapshots and :releases disabled as appropriate.
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
114 ;; Credentials for repositories should *not* be stored
115 ;; in project.clj but in ~/.lein/profiles.clj instead:
116 ;; {:auth {:repository-auth {#"http://blueant.com/archiva/"
117 ;; {:username "milgrim"
118 ;; :password "locative.1"}}}}
119 "snapshots" "http://blueant.com/archiva/snapshots"
120 "releases" "http://blueant.com/archiva/internal"}
bd6959c @cemerick Add support for :deploy-repositories slot for deployment-only repositori...
cemerick authored
121 ;; the deploy task will give preference to repositories specified in
122 ;; :deploy-repositories, and repos listed there will not be used for
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
123 ;; dependency resolution.
124 :deploy-repositories {"releases" "http://blueant.com/archiva/internal/releases"
125 "snapshots" "http://blueant.com/archiva/internal/snapshots"}
a62ff25 @technomancy Update sample, readme, todo.
authored
126 ;; Prevent Leiningen from checking the network for dependencies.
127 ;; This wouldn't normally be set in project.clj; it would come from a profile.
128 :offline? true
129 ;; Override the location of the local maven repository.
130 :local-repo "/home/dude/.lein/repo"
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
131 ;; If you'd rather use a different directory structure, you can set these.
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
132 ;; Paths that contain "inputs" are vectors, "outputs" are strings.
133 :source-paths ["src" "src/main/clojure"]
79b8373 @technomancy Add :compile-path to sample.project.clj.
authored
134 :compile-path "target/classes" ; for .class files
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
135 :test-paths ["test" "src/test/clojure"]
136 :resource-paths ["src/main/resource"] ; non-code files included in classpath/jar
18becb7 @technomancy Add :extra-classpath-dirs to project classpaths.
authored
137 :native-path "src/native" ; where to look for native dependencies
5458e65 @dysinger Make the sample file match the code
dysinger authored
138 :target-path "target/" ; where to place the project's jar file
18becb7 @technomancy Add :extra-classpath-dirs to project classpaths.
authored
139 :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
140 :uberjar-name "sample-standalone.jar" ; as above for uberjar
19b4464 @technomancy Rework some of sample.project.clj.
authored
141 ;; Options to pass to java compiler for java source
142 ;; See http://ant.apache.org/manual/Tasks/javac.html
143 :javac-options {:destdir "classes/"}
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
144 :java-source-paths ["src/main/java"] ; location of Java source
0e189a8 @technomancy Add :omit-source option to leave files in :source-path out of jars.
authored
145 ;; Leave the contents of :source-path out of jars (for AOT projects)
146 :omit-source true
acc9a82 @technomancy Specify what file patterns to exclude from jars. Thanks to Zehua Liu.
authored
147 ;; Files with names matching any of these patterns will be excluded from jars
148 :jar-exclusions [#"(?:^|/).svn/"]
2bda774 @technomancy Add :uberjar-exclusions to project.clj.
authored
149 ;; Same thing, but for uberjars.
150 :uberjar-exclusions [#"META-INF/DUMMY.SF"]
0966229 @technomancy Clean up make-manifest. Fixes #46.
authored
151 ;; Set arbitrary key/value pairs for the jar's manifest.
152 :manifest {"Project-awesome-level" "super-great"}
915e61a @technomancy Add sample.project.clj showing all honored project keys.
authored
153 ;; You can set JVM-level options here.
f732bfe @technomancy Support :eval-in-leiningen key in project.clj for plugins.
authored
154 :jvm-opts ["-Xmx1g"]
155 ;; If your project is a Leiningen plugin, set this to skip the subprocess step
53141ea @technomancy Run eval-in-project using clojure.java.shell. Fixes #239.
authored
156 :eval-in-leiningen false
07a755c @gmwils Add :parent to sample.project.clj
gmwils authored
157 ;; Set parent for working with in a multi-module maven project
ef2b0f0 @xeqi Copy pom.xml generation from depot
xeqi authored
158 :parent [org.example/parent "0.0.1" :relative-path "../parent/pom.xml"]
4ef309b @technomancy Update sample.project.clj for 2.0.0-preview.
authored
159 ;; Extensions here will be propagated to the pom.
ef2b0f0 @xeqi Copy pom.xml generation from depot
xeqi authored
160 :extensions [[org.apache.maven.wagon/wagon-webdav "1.0-beta-2"]
161 [foo/bar-baz "1.0"]])
Something went wrong with that request. Please try again.