                         (if (not java-agent) ["--no_java_agent"])
                         (if http-port [(str "--port=" http-port)])
                         (if http-address [(str "--address=" http-address)])
-                        [(gae-app-dir)])
+                        [target-dir])
           jargs (into-array String jargs)]
 
       (if verbose


   _ modules MODULES edn "modules map"

   v verbose bool "verbose"]

  (boot/with-pre-wrap [fileset]

          (if service
            (comp
             (builtin/pom)
             (builtin/jar))
            identity)
          (target :service service :verbose verbose)
          #_(builtin/sift :include #{(re-pattern (str mod ".*jar"))})
          #_(builtin/install)
          #_(target :verbose verbose)
          ;; (builtin/sift :move {#"(^.*)" (str mod "/$1")})
          ;; FIXME: use cache instead?
          ;; (builtin/target :dir #{(str "target/" mod)})
          )))

(boot/deftask target
  "target, using module name"
  [C no-clean bool "Don't clean target before writing project files"
   m monitor bool "monitoring - target service assembly"
   s service bool "building as service"
   v verbose bool "verbose"]
  (let [mod      (-> (boot/get-env) :gae :module :name)
        app-dir  (-> (boot/get-env) :gae :module :app-dir)
        dir      (if monitor
                   (str app-dir "/target/" mod)
                   (if service (str "target/" mod)
                       "target"))]
    (if service
      (if (not (and mod app-dir))
        (throw (Exception. "For service targets, both :name and :app-dir must be specified in :gae map of build.boot"))))
    (println "TARGET DIR: " dir)
    (builtin/target :dir #{dir}
                    :no-clean (or no-clean false))))

(boot/deftask cache
  "control cache: retrieve, save, clean"
