Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added support for Leiningen 1.7.0.

  • Loading branch information...
commit 95d5cec27d88ba32db040b007b551a27d102f018 1 parent 1892e3d
@gcv authored
Showing with 29 additions and 28 deletions.
  1. +1 −1  README.md
  2. +1 −1  project.clj
  3. +27 −26 src/leiningen/appengine_prepare.clj
View
2  README.md
@@ -25,7 +25,7 @@ Please read the project's HISTORY file to learn what changed in recent releases.
## Dependencies
* Clojure 1.2.1 or Clojure 1.3.0
-* Leiningen 1.6.1
+* Leiningen 1.7.0
* Google App Engine SDK 1.5.5
View
2  project.clj
@@ -1,6 +1,6 @@
(defproject appengine-magic "0.4.7"
:description "Google App Engine library for Clojure."
- :min-lein-version "1.6.1"
+ :min-lein-version "1.7.0"
:repositories {"releases" "http://appengine-magic-mvn.googlecode.com/svn/releases/"
"snapshots" "http://appengine-magic-mvn.googlecode.com/svn/snapshots/"}
:exclusions [org.clojure/clojure]
View
53 src/leiningen/appengine_prepare.clj
@@ -25,32 +25,33 @@
(:dependencies project))
(abort "project.clj error: put appengine-magic in :dev-dependencies, not :dependencies"))
;; compile all; when successful (status is 0), continue to prepare
- (when (= 0 (leiningen.compile/compile (if (contains? project :aot)
- project
- (assoc project
- :keep-non-project-classes true
- :aot [(symbol (format "%s.%s"
- (_dash prj-application)
- prj-servlet))]))))
- ;; delete existing content of target lib/
- (lancet/delete {:dir (.getPath target-lib-dir)})
- ;; prepare destination lib/ directory
- (lancet/mkdir {:dir target-lib-dir})
- ;; make a jar of the compiled app, and put it in WEB-INF/lib
- (leiningen.jar/jar (merge project
- {:omit-source true
- :jar-exclusions [#"^WEB-INF/appengine-generated.*$"]}))
- (lancet/move {:file (leiningen.jar/get-jar-filename project)
- :todir (.getPath target-lib-dir)})
- ;; copy important dependencies into WEB-INF/lib
- (lancet/copy {:todir (.getPath target-lib-dir)}
- (lancet/fileset {:dir lib-dir :includes "*" :excludes "dev"}))
- (lancet/copy {:todir (.getPath target-lib-dir)}
- (lancet/fileset
- {:dir lib-dev-dir
- :includes (str "appengine-magic*,ring-core*,"
- "commons-io*,commons-codec*,commons-fileupload*,"
- "appengine-api-1.0-sdk*,appengine-api-labs*")})))
+ (let [project (if (contains? project :aot)
+ project
+ (assoc project
+ :keep-non-project-classes true
+ :aot [(symbol (format "%s.%s"
+ (_dash prj-application)
+ prj-servlet))]))]
+ (when (= 0 (leiningen.compile/compile project))
+ ;; delete existing content of target lib/
+ (lancet/delete {:dir (.getPath target-lib-dir)})
+ ;; prepare destination lib/ directory
+ (lancet/mkdir {:dir target-lib-dir})
+ ;; make a jar of the compiled app, and put it in WEB-INF/lib
+ (leiningen.jar/jar (merge project
+ {:omit-source true
+ :jar-exclusions [#"^WEB-INF/appengine-generated.*$"]}))
+ (lancet/move {:file (leiningen.jar/get-jar-filename project)
+ :todir (.getPath target-lib-dir)})
+ ;; copy important dependencies into WEB-INF/lib
+ (lancet/copy {:todir (.getPath target-lib-dir)}
+ (lancet/fileset {:dir lib-dir :includes "*" :excludes "dev"}))
+ (lancet/copy {:todir (.getPath target-lib-dir)}
+ (lancet/fileset
+ {:dir lib-dev-dir
+ :includes (str "appengine-magic*,ring-core*,"
+ "commons-io*,commons-codec*,commons-fileupload*,"
+ "appengine-api-1.0-sdk*,appengine-api-labs*")}))))
;; Projects which do not normally use AOT may need some cleanup. This should
;; happen regardless of compilation success or failure.
(when-not (contains? project :aot)
Please sign in to comment.
Something went wrong with that request. Please try again.