Skip to content

Commit 783f56a

Browse files
committed
TDEPS-279 Set aether.connector.userAgent to tools.deps if using as library, set to ClojureCLI for the CLI dep expansion
1 parent 3abbd69 commit 783f56a

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Changelog
33

44
*Also see [Tools and installer changelog](https://github.com/clojure/brew-install/blob/1.12.4/CHANGELOG.md)*
55

6+
* next
7+
* TDEPS-279 Set aether.connector.userAgent to tools.deps if using as library, set to ClojureCLI for the CLI dep expansion
68
* 0.30.1607 on May 12, 2026
79
* Update to Clojure 1.12.5
810
* Update to latest deps

src/main/clojure/clojure/tools/deps/script/make_classpath2.clj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@
134134
(defn run
135135
"Run make-classpath script. See -main for details."
136136
[{:keys [cp-file jvm-file main-file basis-file manifest-file skip-cp tool-mode tool-name tool-aliases trace tree] :as opts}]
137+
(when-let [user-agent (some-> "clojure/install/useragent.txt" jio/resource slurp)]
138+
(System/setProperty "aether.connector.userAgent" user-agent))
137139
(let [opts' (cond-> opts
138140
(and tool-mode (not tool-aliases))
139141
(assoc :tool-data (when tool-name (resolve-tool-args tool-name))))

src/main/clojure/clojure/tools/deps/util/maven.clj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@
207207
(^RepositorySystem []
208208
(make-system (make-locator)))
209209
(^RepositorySystem [^ServiceLocator locator]
210+
(when-not (System/getProperty "aether.connector.userAgent")
211+
(System/setProperty "aether.connector.userAgent" "tools.deps"))
210212
(.getService locator RepositorySystem)))
211213

212214
(def ^TransferListener console-listener

0 commit comments

Comments
 (0)