Permalink
Browse files

Merge branch 'master' of https://github.com/kumarshantanu/lein-servlet

  • Loading branch information...
2 parents 70ef17f + f917169 commit 33b1e3cdd911635a145dea305234f675b70a04fb @kumarshantanu committed Jun 17, 2012
Showing with 20 additions and 23 deletions.
  1. +1 −1 CHANGES.md
  2. +19 −22 plugin/src/leiningen/servlet.clj
View
@@ -7,7 +7,7 @@
* [TODO] Generate WAR file for a webapp
-## 2012-June-??
+## 2012-June-17
* Servlet-engine adapters:
* Jetty 7.6.3.v20120416 `lein-servlet/adapter-jetty7` `0.1.0`
@@ -96,11 +96,9 @@
(let [deps (get-in project DEPS)
repos (get-in project REPOS)]
(when deps (load-deps deps repos)))
- (println project)
(let [project (-> project
with-defaults
(update-project-deps (get-in project DEPS)))
- _ (println "Servlet:" (:servlet project))
wanted-eng (get-in project WANTED-ENG)
config (get-in project CONFIG)
webapps (get-in project WEBAPPS)
@@ -110,7 +108,6 @@
port (get-in project PORT)
config (merge {:tmpdir (str (:target-path project) \/ enam \. port)}
config)
- _ (println "Config:" config)
home-url (str "http://localhost:" port)]
(if (and ens enam)
(eval/eval-in-project project `(let [e# (~full-name ~config ~webapps)]
@@ -121,6 +118,24 @@
(err-println "Unable to determine engine"))))
+(defn show-help
+ "Show help for this plugin"
+ []
+ (println "
+Synopsis:
+ lein servlet <command> [<arguments> ..]
+
+where <command> and respective <arguments> are:
+ run
+ war [<app-name>]
+ help
+
+To generate a new project template containing example configuration:
+ lein new servlet demo
+")
+ (flush))
+
+
(defn war
"Generate WAR file"
[project [app-name]]
@@ -130,7 +145,7 @@
w-names (set (keys webapps))
v-names (format "(valid names: %s)" (comma-sep (keys webapps)))]
(cond (empty? w-names) (do (err-println "No webapps configured")
- (help/show-help))
+ (show-help))
(w-names app-name) (war/generate-war project
(get webapps app-name))
app-name (err-println "No such webapp name"
@@ -141,24 +156,6 @@
v-names))))
-(defn show-help
- "Show help for this plugin"
- []
- (println "
-Synopsis:
- lein servlet <command> [<arguments> ..]
-
-where <command> and respective <arguments> are:
- run
- war [<app-name>]
- help [config]
-
-To generate a new project template containing example configuration:
- lein new servlet demo
-")
- (flush))
-
-
(defn servlet
"Work with servlets in Java or another JVM language."
[project & [cmd & args]]

0 comments on commit 33b1e3c

Please sign in to comment.