Skip to content

Commit

Permalink
Add :omit-source option to leave files in :source-path out of jars.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Aug 16, 2010
1 parent 8ec4cbf commit 0e189a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions sample.project.clj
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/leiningen/jar.clj
Expand Up @@ -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
Expand Down

0 comments on commit 0e189a8

Please sign in to comment.