   "construct ear dir"
   [k keep bool "keep intermediate .clj files"
    i meta-inf META-INF str "META-INF dir path"
-   m modules MODULES edn "modules map"
+   ;; m modules MODULES edn "modules map"
    v verbose bool "Print trace messages."]
-  (println "EAR: " modules)
-  (let [paths (set (map #(:war %) modules))
+  ;; (println "EAR: " modules)
+  (let [;; paths (set (map #(:war %) modules))
         m (or meta-inf "./")
         tmpdir (boot/tmp-dir!)
 

          (pod/unpack-jar jar-path (.getParent sdk-dir))))
      fileset)))

;; FIXME:  for dev phase, we want to include deps in test scope
(boot/deftask libs
  ""
  [v verbose bool "Print trace messages."]
  (comp
   (builtin/uber :as-jars true :exclude-scope #{"provided"})
   ;; (builtin/sift :include #{#"zip$"} :invert true)
   ;; (builtin/sift :include #{#".*appengine-api-.*jar$"} :invert true)
   (builtin/sift :move {#"(.*\.jar$)" (str lib-dir "/$1")})))

;; FIXME: drive this from logging.edn
(boot/deftask logging

        co-jars    (->> checkouts (map (comp :jar val)))
        co-dirs    (->> checkouts (map (comp :dir val)))

        checkout-vec (-> (boot/get-env) :checkouts)
        cos (map #(assoc (apply hash-map %) :coords [(first %) (second %)]) checkout-vec)
        ]
    ;; (println "checkouts: " checkouts)
    (println "checkout-vec: " checkout-vec)
    (println "co-dirs: " co-dirs)
    (println "cos: " cos)
    (boot/with-pre-wrap [fileset]
      (loop [cos cos
             fs fileset]
        (if (empty? cos)
          fs
          (let [co (first cos)]
                (println "CO: " co)
                (println "COORDS: " (:coords co))
                (println "MODULE: " (:module co))
                (let [target-path (:module co)
                      out (io/file (.getPath tmpdir) target-path)
                      corec (get checkouts (first (:coords co)))
                      co-dir (:dir corec)
                      jar-path (.getPath (:jar corec))
                      ;; jar-path (pod/resolve-dependency-jar (boot/get-env) (:coords co))

                      ;; in-file (boot/tmp-file (boot/tmp-get fileset path))
                      tmpdir (boot/tmp-dir!)
                      out-dir (doto (io/file tmpdir (:module co)) io/make-parents)
                      newfs (boot/new-fileset)
                      ]
                  (println "OUTDIR: " out-dir)
                  (fs/copy-dir co-dir out-dir)
                  ;; (println "checkout: " corec)
                  (println "jar-path: " jar-path)
                  (println "co-dir: " (.getPath co-dir))
                  ;; (pp/pprint (file-seq out-dir))
                  (println "target-path: " target-path)
                  (recur (rest cos)
                         (-> fs
                             (boot/add-asset tmpdir :exclude #{(re-pattern (str "/META-INF/.*"))})
                             ;; (builtin/sift :include #{(re-pattern (str mod "/META-INF/.*"))}
                             ;;               :invert true)
                             (boot/commit!))))))))))

        ;; (comp
        ;;  (builtin/sift :add-asset #{co-dir})
        ;;  (builtin/sift :move {#"(^.*)" (str mod "/$1")})
        ;;  (builtin/sift :include #{(re-pattern (str "^" mod "/META-INF/.*"))} :invert true)
        ;;  (builtin/sift :add-asset #{"assets"}))
        ;; ))))

    ;; (println "boot-env deps: " (:dependencies (boot/get-env)))
    ;; ;; (println "pod-env deps: " (:dependencies pod-env))
    ;; (println "jar-path:" jar-path)
    ;; (println "out path:" out)
    ;; (println "co-jars: " (type (first co-jars)))
    ;; (builtin/sift :move {(re-pattern (.getPath (first co-dirs))) "foobar"})
    ;; (builtin/sift :add-asset #{"foobar"})




    ;; #_(comp
    ;;  (boot/with-pre-wrap [fileset]
    ;;    (pod/unpack-jar jar-path out)
