     (clojure.walk/postwalk freq-fn dep-hierarchy)
     @frequency))
 
+(defn- expand-dep
+  [repositories deps-node]
+  (debug "deps-node: " deps-node)
+  (let [res (if (map? deps-node)
+          (->> (map
+                (fn [[k v]]
+                  (->> (aether/resolve-dependencies :coordinates [k] :repositories repositories)
+                       (aether/dependency-hierarchy [k])))
+                deps-node)
+               (into {}))
+          deps-node)]
+    (debug "res: " res)
+    res))
+
+(defn- expand-dep-hierarchy
+  [repositories dep-hierarchy]
+  (clojure.walk/prewalk
+   (partial expand-dep repositories)
+   (zipmap (keys dep-hierarchy) (repeat nil))))
+
 (defn lookup-opt [opt-key opts]
   (second (drop-while #(not= % opt-key) opts)))
 
-(defn- unzip&update-artifact! [pname pversion pprefix skip-repackage-java-classes srcdeps src-path dep-hierarchy prefix-exclusions project-source-dirs parent-clj-dirs dep]
-  (let [art-name         (-> dep first name (str/split #"/") last)
-        art-name-cleaned (str/replace art-name #"[\.-_]" "")
-        art-version      (str "v" (-> dep second (str/replace "." "v")))
-        clj-files        (doall (unzip (-> dep meta :file) srcdeps))
-        clj-dirs         (->> (map cljfile->dir clj-files)
-                              (remove str/blank?)
-                              (map (fn [clj-dir] (str srcdeps "/" clj-dir))) set)
-        repl-prefix      (replacement-prefix pprefix src-path art-name-cleaned art-version nil)
+(defn- update-artifact!
+  [{:keys [pname pversion pprefix skip-repackage-java-classes srcdeps prefix-exclusions project-source-dirs]}
+   {:keys [art-name-cleaned art-version clj-files clj-dirs]}
+   {:keys [src-path parent-clj-dirs]}]
+  (let [repl-prefix      (replacement-prefix pprefix src-path art-name-cleaned art-version nil)
         prefixes         (apply dissoc (reduce #(assoc %1 %2 (str (replacement repl-prefix %2 nil))) {} (possible-prefixes clj-files)) prefix-exclusions)
         all-dirs         (->> [(if (str/ends-with? src-path (sym->file-name pprefix))
                                  project-source-dirs

            ;; remove old file
            (fs/delete old-path)))))))

(defn- expand-dep
  [repositories deps-node]
  (debug "deps-node: " deps-node)
  (let [res (if (map? deps-node)
          (->> (map
                (fn [[k v]]
                  (->> (aether/resolve-dependencies :coordinates [k] :repositories repositories)
                       (aether/dependency-hierarchy [k])))
                deps-node)
               (into {}))
          deps-node)]
    (debug "res: " res)
    res))

(defn- expand-dep-hierarchy
  [repositories dep-hierarchy]
  (clojure.walk/prewalk
   (partial expand-dep repositories)
   (zipmap (keys dep-hierarchy) (repeat nil))))

(defn source-deps
  "Dependencies as source: used as if part of the project itself.

                               (map fs/file clj-dirs)
                               parent-clj-dirs)
                              vec)]
    (info (format "  munge source files of %s artifact."  art-name-cleaned))
    (debug "    proj-source-dirs" project-source-dirs " clj files" clj-files "clj dirs" clj-dirs " path to dep" src-path "parent-clj-dirs: " parent-clj-dirs)
    (debug "   modified namespace prefix: " repl-prefix)
    (debug "    src path: " src-path)
    (debug "    all dirs: " all-dirs)
