Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/update-always'
Browse files Browse the repository at this point in the history
Fixes #35
  • Loading branch information
micha committed Dec 26, 2014
2 parents 36ab323 + 74d2b50 commit 8116af7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion boot/aether/src/boot/aether.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

(defn set-offline! [x] (reset! offline? x))
(defn set-update! [x] (reset! update? x))
(defn update-always! [] (set-update! :always))
(defn set-local-repo! [x] (reset! local-repo x))

(defn default-repositories
Expand Down Expand Up @@ -71,7 +72,11 @@
:offline? (or @offline? (:offline? env))
:mirrors (:mirrors env)
:proxy (or (:proxy env) (get-proxy-settings))
:transfer-listener transfer-listener)
:transfer-listener transfer-listener
:repository-session-fn (if (= @update? :always)
#(doto (aether/repository-session %)
(.setUpdatePolicy (aether/update-policies :always)))
aether/repository-session))
(catch Exception e
(let [root-cause (last (take-while identity (iterate (memfn getCause) e)))]
(if-not (and (not @offline?) (instance? java.net.UnknownHostException root-cause))
Expand Down
4 changes: 3 additions & 1 deletion boot/base/src/main/java/boot/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ public static class Exit extends Exception {
public static File[]
resolveDepJars(ClojureRuntimeShim shim, String sym, String bootversion, String cljversion) {
shim.require("boot.aether");
if (localrepo != null)
if (localrepo != null) {
shim.invoke("boot.aether/set-local-repo!", localrepo);
}
shim.invoke("boot.aether/update-always!");
return (File[]) shim.invoke(
"boot.aether/resolve-dependency-jars", sym, bootversion, cljversion); }

Expand Down

0 comments on commit 8116af7

Please sign in to comment.