     (spit out-file-path project-string)
     out-file-path))
 
-(schema/defn build-uberjar-from-coordinates! :- File
-  "Build an uberjar from maven coordinates and return a file pointing to the built uberjar"
+(schema/defn build-uberjar-from-coordinates! :- UberjarInfo
+  "Build an uberjar from maven coordinates and return a map containing a file
+   pointing to the built uberjar and the lein project map that was used to
+   create it"
   [repositories
    [project-symbol version :as dependency-coordinates]]
   (let [dependency-jar (resolve-dependency! dependency-coordinates repositories)

    (mapv build-fn dependencies)))

(schema/defn copy-additional-uberjars!
  [uberjar-paths :- [schema/Str]]
  (lein-main/info "Copying additional uberjars to staging directory")
  (doseq [jar-path uberjar-paths]
    (let [destination-path (format "%s/%s" staging-dir (fs/base-name jar-path))]
      (fs/copy jar-path destination-path))))

(defmulti action
  (fn [action & args] action))

    ; When the project.clj file is read by project/read above, it includes the
    ; file's location in the project map that it produces. This is how the
    ; uberjar/uberjar function knows where to create the new uberjar
    (let [uberjar-file (uberjar/uberjar project-map)]
      {:uberjar uberjar-file
       :lein-project project-map})))

(schema/defn build-additional-uberjars! :- [UberjarInfo]
  "Builds uberjars from projects specified in the :additional-uberjars section
  of the ezbake config and returns a list of information about the built uberjars.

  For dependency resolution, we use the same list of repositories (under the
  :repositories key in project.clj) as the lein project that ezbake is running
