                                     {:group groupname
                                      :name  artifact
                                      :version version})))
+                (save-to-file (io/file (config :repo) group artifact version file)
+                              contents))
+              (do
                 (when-not (find-jar groupname artifact version)
                   (add-jar account  {:group groupname
                                      :name  artifact
-                                     :version version})))
-              (save-to-file (io/file (config :repo) group artifact version file)
-                            contents))
+                                     :version version}))
+                (save-to-file (io/file (config :repo) group artifact version file)
+                              body)))
             {:status 201 :headers {} :body nil})))))
 
 (defn wrap-file-at [app dir prefix]

         (with-account
           (authorized!
            (string/replace group "/" ".")
            (let [contents (slurp body)]
              (if (.endsWith file ".pom")
                (if (find-jar groupname artifact version)
                  (update-jar account
                              (merge

         (authorized!
          (string/replace group "/" ".")
          (save-to-file (io/file (config :repo) group artifact file)
                        body)
          {:status 201 :headers {} :body nil})))
  (PUT ["/:group/:artifact/:version/:file"
        :group #".+" :artifact #"[^/]+" :version #"[^/]+" :file #"[^/]+"]
