Aaah,我明白了。仅为了记录,我是如何得出错误结论的
我将log4j从我的Maven仓库中删除了
rm -rf ~/.m2/repository/org/apache/logging/log4j/
运行我的构建
$ clojure -X:depstar uberjar :jar target/foo.jar
Downloading: org/apache/logging/log4j/log4j-core/2.14.1/log4j-core-2.14.1.pom from central
Downloading: org/apache/logging/log4j/log4j/2.14.1/log4j-2.14.1.pom from central
Downloading: org/apache/logging/logging-parent/3/logging-parent-3.pom from central
Downloading: org/apache/logging/log4j/log4j-api/2.14.1/log4j-api-2.14.1.pom from central
Downloading: org/apache/logging/log4j/log4j-core/2.14.1/log4j-core-2.14.1.jar from central
Downloading: org/apache/logging/log4j/log4j-api/2.14.1/log4j-api-2.14.1.jar from central
...
然后想知道为什么它下载了log4j?
然后我看到了在clojure/tools.logging中的Alex的《再次更新log4j》提交
https://github.com/clojure/tools.logging/commit/8e8f899c00d79b03a7f5a3a83e52433d689feaf7
,(没有注意到pom.xml
),并且没有注意到它只在project.clj
的dev
配置文件中,因为它的位置更高,并且没有被列在GitHub上的增删列表中..
现在我在被纠正后看到,它是我deps.edn
中的构建依赖项 depstar
:aliases
{:depstar
{:replace-deps
{com.github.seancorfield/depstar {:mvn/version "2.1.303"}}
:ns-default hf.depstar
:exec-args {}}}
它依赖于log4j。
感谢大家帮助我解决问题。
编辑:格式化