        (map first)))
 
 (defmacro with-assembly-root [assembly-root & body]
-  `(binding [root-dir  (-> ~assembly-root .getCanonicalFile .getParentFile .getParentFile)
-             build-dir (io/file (.getCanonicalFile ~assembly-root) "target/stage")]
+  `(binding [assembly-dir  (-> ~assembly-root .getCanonicalFile)]
      ~@body))
 
 (defn attr= [attr val loc]

              {:file       file
               :subsystem? (subsystem-module? file)}))
          {}
          (glob/glob (str (.getAbsolutePath root-dir)
                          "/modules/*/target/*-module"))))

(defn immutant-subsystems []

(defn copy-static-config [slim?]
  (let [type (if slim? "slim" "full")]
    (with-message "Copying config files"
      (io/copy (io/file assembly-dir (format "src/resources/standalone.%s.xml" type))
        (io/file (jboss-dir) "standalone/configuration/standalone.xml"))
      (io/copy (io/file assembly-dir (format "src/resources/logging-standalone.properties" type))
               (io/file (jboss-dir) "standalone/configuration/logging.properties"))
      (io/copy (io/file assembly-dir (format "src/resources/standalone-ha.%s.xml" type))
               (io/file (jboss-dir) "standalone/configuration/standalone-ha.xml"))
      (io/copy (io/file assembly-dir (format "src/resources/domain.%s.xml" type))
               (io/file (jboss-dir) "domain/configuration/domain.xml"))
      (io/copy (io/file assembly-dir (format "src/resources/host.%s.xml" type))
               (io/file (jboss-dir) "domain/configuration/host.xml")))))
