2010-06-05 20:26:52 +00:00
|
|
|
;; This is an annotated example of the options that may be set in a
|
|
|
|
;; project.clj file. It is a fairly contrived example in order to
|
|
|
|
;; cover all options exhaustively; it shouldn't be considered a
|
|
|
|
;; representative configuration.
|
|
|
|
|
|
|
|
;; The project is named "sample", and its group-id is "org.example".
|
|
|
|
(defproject org.example/sample "1.0.0-SNAPSHOT" ; version "1.0.0-SNAPSHOT"
|
2010-06-25 05:08:05 +00:00
|
|
|
;; Beyond this point you may prepend a form with unquote, or ~, to eval it.
|
|
|
|
|
2010-06-05 20:26:52 +00:00
|
|
|
;; The descrption is used to allow searchability when uploaded to Clojars.
|
|
|
|
:description "A sample project"
|
|
|
|
;; The URL is also metadata that Clojars uses.
|
|
|
|
:url "http://example.org/sample-clojure-project"
|
2010-06-17 09:33:47 +00:00
|
|
|
;; The mailing list of the project. If the project has multiple mailing
|
|
|
|
;; lists, use the :mailing-lists key (bound to a seq of mailing list
|
|
|
|
;; descriptions as below).
|
|
|
|
:mailing-list {:name "sample mailing list"
|
|
|
|
:archive "http://example.org/sample-mailing-list-archives"
|
2010-07-13 04:16:02 +00:00
|
|
|
:other-archives ["http://example.org/sample-list-archive2"
|
|
|
|
"http://example.org/sample-list-archive3"]
|
2010-06-17 09:33:47 +00:00
|
|
|
:post "list@example.org"
|
|
|
|
:subscribe "list-subscribe@example.org"
|
|
|
|
:unsubscribe "list-unsubscribe@example.org"}
|
|
|
|
;; The project's license. :distribution should be :repo or :manual;
|
|
|
|
;; :repo means it is ok for public repositories to host this project's
|
|
|
|
;; artifacts. :licence can be used in place of :license, and for projects
|
|
|
|
;; which allow their users to choose among several licenses, :licenses
|
|
|
|
;; and :licences keys are supported. NB. all licenses mentioned in
|
|
|
|
;; project.clj under any of the supported keys will be put in pom.xml.
|
|
|
|
:license {:name "Eclipse Public License - v 1.0"
|
|
|
|
:url "http://www.eclipse.org/legal/epl-v10.html"
|
|
|
|
:distribution :repo
|
|
|
|
:comments "same as Clojure"}
|
2010-06-05 20:26:52 +00:00
|
|
|
;; Dependencies are listed as [group-id/name version].
|
|
|
|
:dependencies [[org.clojure/clojure "1.1.0"]
|
|
|
|
[org.clojure/clojure-contrib "1.1.0"]
|
2010-08-24 03:43:35 +00:00
|
|
|
[org.jclouds/jclouds "1.0-RC6" :classifier "jdk15"]
|
2010-06-05 20:26:52 +00:00
|
|
|
[log4j "1.2.15" :exclusions [javax.mail/mail
|
|
|
|
javax.jms/jms
|
|
|
|
com.sun.jdmk/jmxtools
|
|
|
|
com.sun.jmx/jmxri]]]
|
2010-08-24 04:21:54 +00:00
|
|
|
;; Warns users of earlier versions of Leiningen.
|
|
|
|
:min-lein-version "1.3.0"
|
2010-06-22 02:19:39 +00:00
|
|
|
;; Before fetching dependencies, the contents of the lib/ directory
|
|
|
|
;; will get deleted unless this is set to true.
|
|
|
|
:disable-implicit-clean false
|
2010-07-30 20:28:18 +00:00
|
|
|
;; Load these namespaces on startup to pick up hooks from
|
|
|
|
;; them. Hooks are generally included in plugins.
|
|
|
|
:hooks [leiningen.hooks.difftest]
|
2010-11-25 05:18:47 +00:00
|
|
|
;; Predicates to determine whether to run a test or not. See tutorial.
|
|
|
|
:test-selectors {:default (fn [t] (not (or (:integration v) (:regression v))))
|
|
|
|
:integration :integration
|
|
|
|
:regression :regression}
|
2010-07-30 20:28:18 +00:00
|
|
|
;; Set this to true to search the classpath for hooks. Will load all
|
|
|
|
;; namespaces matching leiningen.hooks.*. Warning: this will cause
|
|
|
|
;; Leiningen to start slowly, especially with many dependencies.
|
|
|
|
:implicit-hooks false
|
2010-06-05 20:26:52 +00:00
|
|
|
;; Dev dependencies are intended for use only during
|
|
|
|
;; development. Projects that depend on this project will not pull
|
|
|
|
;; in its dev-dependencies, and they won't be included in the uberjar.
|
|
|
|
:dev-dependencies [[org.clojure/swank-clojure "1.2.1"]]
|
|
|
|
;; These namespaces will be AOT-compiled. Needed for gen-class and
|
|
|
|
;; other Java interop functionality. :namespaces is an alias for this.
|
2010-09-08 01:48:42 +00:00
|
|
|
;; Put a regex here to compile all namespaces whose names match.
|
2010-06-05 20:26:52 +00:00
|
|
|
:aot [org.example.sample.SampleClass]
|
2010-09-05 22:19:18 +00:00
|
|
|
;; The -main function in this namespace will be run at launch if you
|
|
|
|
;; create an uberjar. Repl sessions will start in this namespace as well.
|
2010-08-23 04:14:58 +00:00
|
|
|
:main org.example.sample
|
2010-08-08 18:51:28 +00:00
|
|
|
;; This will get loaded automatically when you launch a repl.
|
|
|
|
:repl-init-script "src/main/clojure/init.clj"
|
2010-11-20 03:21:30 +00:00
|
|
|
;; These will get passed to clojure.main/repl; see its docstring for details.
|
|
|
|
:repl-options {:prompt (constantly "your command, master? ")}
|
2010-08-29 20:40:50 +00:00
|
|
|
;; Customize the socket the repl task listens on.
|
|
|
|
:repl-port 4001
|
|
|
|
:repl-host "0.0.0.0"
|
2010-06-05 20:26:52 +00:00
|
|
|
;; Emit warnings on all reflection calls.
|
|
|
|
:warn-on-reflection true
|
|
|
|
;; Set this in order to only use the :repositories you list below.
|
|
|
|
:omit-default-repositories true
|
2010-10-22 14:35:22 +00:00
|
|
|
:repositories {"java.net" "http://download.java.net/maven/2"
|
|
|
|
"private" {:url "http://private.repo"
|
|
|
|
:username "milgrim"
|
|
|
|
:password "locative.1"}}
|
2010-06-05 20:26:52 +00:00
|
|
|
;; If you'd rather use a different directory structure, you can set these.
|
|
|
|
:source-path "src/main/clojure"
|
|
|
|
:library-path "target/dependency"
|
|
|
|
:test-path "src/test/clojure"
|
2010-09-22 03:16:42 +00:00
|
|
|
:resources-path "src/main/resource" ; non-code files included in classpath/jar
|
|
|
|
:test-resources-path "src/test/resource" ; added to classpath but not in jar
|
2010-08-23 04:14:58 +00:00
|
|
|
:native-path "src/native" ; where to look for native dependencies
|
|
|
|
:jar-dir "target/" ; where to place the project's jar file
|
|
|
|
:jar-name "sample.jar" ; name of the jar produced by 'lein jar'
|
2010-06-24 01:03:20 +00:00
|
|
|
:uberjar-name "sample-standalone.jar" ; as above for uberjar
|
2010-11-24 04:11:31 +00:00
|
|
|
:java-source-path "src/main/java" ; location of Java source.
|
2010-08-16 20:22:56 +00:00
|
|
|
;; Leave the contents of :source-path out of jars (for AOT projects)
|
|
|
|
:omit-source true
|
2010-09-24 05:45:57 +00:00
|
|
|
;; Files with names matching any of these patterns will be excluded from jars
|
|
|
|
:jar-exclusions [#"(?:^|/).svn/"]
|
2010-11-20 19:03:00 +00:00
|
|
|
;; Same thing, but for uberjars.
|
|
|
|
:uberjar-exclusions [#"META-INF/DUMMY.SF"]
|
2010-08-08 23:16:48 +00:00
|
|
|
;; Set arbitrary key/value pairs for the jar's manifest.
|
|
|
|
:manifest {"Project-awesome-level" "super-great"}
|
2010-06-05 20:26:52 +00:00
|
|
|
;; You can set JVM-level options here.
|
2010-10-24 21:28:26 +00:00
|
|
|
:jvm-opts ["-Xmx1g"]
|
|
|
|
;; If your project is a Leiningen plugin, set this to skip the subprocess step
|
|
|
|
:eval-in-leiningen false)
|