           (appengine :verbose verbose)
           (builtin/sift :move {#"(.*clj$)" (str classes-dir "/$1")})
           (builtin/sift :move {#"(.*\.class$)" (str classes-dir "/$1")})
+          (builtin/sift :move {#"(^.*)" (str mod "/$1")})
           ;; FIXME: use cache instead?
           ;; (builtin/target :dir #{(str "target/" mod)})
           )))

  "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"
   v verbose bool "Print trace messages."]
  (println "EAR: " modules)
  (let [paths (set (map #(:war %) modules))
        m (or meta-inf "./")
        tmpdir (boot/tmp-dir!)


  "dev build, source only"
  [v verbose bool "verbose"]
  (let [mod (str (-> (boot/get-env) :gae :module))
        prev (atom nil)
        cache-dir (boot/cache-dir! :boot-gae/build)]
    ;; (println "MODULE: " mod)
    (comp
     (boot/with-pre-wrap [fileset]
       (let [changes (->> (boot/fileset-diff @prev fileset)
                          boot/output-files
                          (map :path))
             fs (boot/new-fileset)]
         (doseq [path changes]
           (if verbose (util/info (str "changed: " path "\n")))
           (let [in-file (boot/tmp-file (boot/tmp-get fileset path))
                 out-file (if (str/ends-with? path "clj")
                            (doto (io/file cache-dir classes-dir path) io/make-parents)
                            (doto (io/file cache-dir path) io/make-parents))]
             (io/copy in-file out-file)))
         (reset! prev fileset)))
     (builtin/sift :include #{#".*"} :invert true)
     (boot/with-pre-wrap [fileset]
      (-> fileset
          (boot/add-asset cache-dir)
          boot/commit!)))))

(boot/deftask prod
  "make a prod build"
