-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uploading of snapshots with classifiers [#511]
The previous fix wasn't enough, since it used the version from the pom to split filenames when determining the classifier, and the version in the filename doesn't match the version from the pom for snapshots, since the former will be a timestamp-based version.
- Loading branch information
Showing
2 changed files
with
38 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,20 +171,37 @@ | |
(deftest user-can-deploy-with-classifiers | ||
(-> (session (help/app-from-system)) | ||
(register-as "dantheman" "[email protected]" "password")) | ||
(let [pom (io/file (io/resource "test-0.0.1/test.pom"))] | ||
(aether/deploy | ||
:coordinates '[fake/test "0.0.1"] | ||
:artifact-map {[:extension "jar"] (io/file (io/resource "test.jar")) | ||
[:classifier "test" :extension "jar"] (io/file (io/resource "test.jar")) | ||
[:extension "pom"] pom} | ||
:repository {"test" {:url (str "http://localhost:" help/test-port "/repo") | ||
:username "dantheman" | ||
:password "password"}} | ||
:local-repo help/local-repo)) | ||
(aether/deploy | ||
:coordinates '[fake/test "0.0.1"] | ||
:artifact-map {[:extension "jar"] (io/file (io/resource "test.jar")) | ||
[:classifier "test" :extension "jar"] (io/file (io/resource "test.jar")) | ||
[:extension "pom"] (io/file (io/resource "test-0.0.1/test.pom"))} | ||
:repository {"test" {:url (str "http://localhost:" help/test-port "/repo") | ||
:username "dantheman" | ||
:password "password"}} | ||
:local-repo help/local-repo) | ||
(are [ext] (.exists (io/file (:repo help/test-config) "fake" "test" "0.0.1" | ||
(format "test-0.0.1%s" ext))) | ||
".pom" ".jar" "-test.jar")) | ||
|
||
(deftest user-can-deploy-snapshot-with-classifiers | ||
(-> (session (help/app-from-system)) | ||
(register-as "dantheman" "[email protected]" "password")) | ||
(aether/deploy | ||
:coordinates '[fake/test "0.0.3-SNAPSHOT"] | ||
:artifact-map {[:extension "jar"] (io/file (io/resource "test.jar")) | ||
[:classifier "test" :extension "jar"] (io/file (io/resource "test.jar")) | ||
[:extension "pom"] (io/file (io/resource "test-0.0.3-SNAPSHOT/test.pom"))} | ||
:repository {"test" {:url (str "http://localhost:" help/test-port "/repo") | ||
:username "dantheman" | ||
:password "password"}} | ||
:local-repo help/local-repo) | ||
;; we can't look for files directly since the version will be timestamped | ||
(is (= 3 (->> (file-seq (io/file (:repo help/test-config) "fake" "test" "0.0.3-SNAPSHOT")) | ||
(filter (memfn isFile)) | ||
(filter #(re-find #"(pom|jar|-test\.jar)$" (.getName %))) | ||
count)))) | ||
|
||
(deftest user-can-deploy-with-signatures | ||
(-> (session (help/app-from-system)) | ||
(register-as "dantheman" "[email protected]" "password")) | ||
|