Aaah,我明白了。记录一下我是如何得出错误结论的
我从我的maven仓库中删除了log4j
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?
然后我看到Alex在clojure/tools.logging中提交了再次更新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。
感谢大家的帮助。
编辑:格式化