Permalink
Browse files

Add :omit-source option to leave files in :source-path out of jars.

  • Loading branch information...
1 parent 8ec4cbf commit 0e189a8da31cdefd90118b2d96414f3dc8ad5d3d @technomancy committed Aug 16, 2010
Showing with 6 additions and 1 deletion.
  1. +2 −0 NEWS
  2. +2 −0 sample.project.clj
  3. +2 −1 src/leiningen/jar.clj
View
@@ -2,6 +2,8 @@ Leiningen NEWS -- history of user-visible changes
= 1.3.0 / ???
+* Add :omit-source option to project.clj for shipping aot-only jars.
+
* Make repl task listen on a socket as well as the command-line.
* Write shell wrapper scripts at installation time. See TUTORIAL.md.
View
@@ -74,6 +74,8 @@
:jar-dir "target/" ; where to place the project's jar file
:jar-name "sample.jar" ; name of the jar produced by 'lein jar'
:uberjar-name "sample-standalone.jar" ; as above for uberjar
+ ;; Leave the contents of :source-path out of jars (for AOT projects)
+ :omit-source true
;; Set arbitrary key/value pairs for the jar's manifest.
:manifest {"Project-awesome-level" "super-great"}
;; You can set JVM-level options here.
@@ -140,8 +140,9 @@
(.exists (file (:resources-path project))))
{:type :path :path (:resources-path project)})
{:type :path :path (:compile-path project)}
- {:type :path :path (:source-path project)}
{:type :path :path (str (:root project) "/project.clj")}]
+ (when-not (:omit-source project)
+ [{:type :path :path (:source-path project)}])
(shell-wrapper-filespecs project deps-fileset)))
(defn jar

0 comments on commit 0e189a8

Please sign in to comment.