   (deputils/find-files-in-dir-in-jar jar terminus-prefix))
 
 (defn- prefix-project-name
-  [project build-target]
+  [project-name build-target]
     (if (= build-target "pe")
-      (str "pe-" (name project))
-      (name project)))
+      (str "pe-" (name project-name))
+      (name project-name)))
 
 (defn generate-terminus-list
   [dependencies build-target]
-  (for [{:keys [project version jar]} dependencies
+  (for [{:keys [project-name version jar]} dependencies
         :let [terminus-files (get-terminus-files-in jar)]
         :when (not (empty? terminus-files))]
-    [(prefix-project-name project build-target) version terminus-files jar]))
+    [(prefix-project-name project-name build-target) version terminus-files jar]))
 
 (defn cp-terminus-files "Stage all terminus files. Returns a sequence zipping project names and
   their terminus files."
   [dependencies build-target]
   (let [files (generate-terminus-list dependencies build-target)]
-    (doseq [[project version terminus-files jar] files]
-      (lein-main/info (str "Staging terminus files for " project " version " version))
+    (doseq [[project-name version terminus-files jar] files]
+      (lein-main/info (str "Staging terminus files for " project-name " version " version))
       (deputils/cp-files-from-jar terminus-files jar staging-dir))
     ;; Remove the jars from the returned data
     (map (partial take 3) files)))

  [_ lein-project build-target template-dir]
  (cp-template-files template-dir)
  (cp-template-files (get-template-file "global"))
  (let [project "./"
        dependencies (deputils/get-dependencies-with-jars lein-project)
        config-files (cp-shared-config-files dependencies)
        config-files (cp-project-config-files project config-files)
        cli-app-files (cp-shared-cli-app-files dependencies)
        bin-files (cp-shared-bin-files dependencies)
        terminus-files (cp-terminus-files dependencies build-target)]
    (if cli-app-files
      (cp-cli-wrapper-scripts project))
    (cp-doc-files lein-project)
    (generate-ezbake-config-file lein-project build-target config-files cli-app-files bin-files terminus-files)
    (generate-project-data-yaml lein-project build-target)

  (str/replace-first project-name #"^pe-" ""))

(defn cp-cli-wrapper-scripts
  [project-name]
  (fs/copy+ (get-staging-template-file "cli-app.erb")
            (fs/file staging-dir "ext" "bin" (str (get-real-name project-name) ".erb"))))

(defn get-out-dir-for-doc-file
  [dep jar-entry]
