Clojure 版本 1.11.1.1267
OS: macOS 13.x
命令 clj -Spom
不像预期那样工作,生成的 pom.xml
文件没有显示任何依赖。
标志 -X:deps list
和 -X:deps tree
能按预期工作,并且能正确解决 deps.edn
的依赖问题,但标志 -Spom
不能生成一个有效的 pom.xml
文件(它不包含任何依赖)。
在以下仓库中测试: https://github.com/clojure/tools.deps
输出 clj -Spom && cat pom.xml
(1.11.1.1267)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<groupId>tools.deps</groupId>
<artifactId>tools.deps</artifactId>
<version>0.1.0</version>
<name>tools.deps</name>
<dependencies/>
<repositories/>
</project>
输出 clj -Spom && cat pom.xml
(1.11.1.1165)
Skipping paths: src/main/resources
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<groupId>tools.deps</groupId>
<artifactId>tools.deps</artifactId>
<version>0.1.0</version>
<name>tools.deps</name>
<dependencies>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.10.3</version>
</dependency>
<dependency>
<groupId>com.cognitect.aws</groupId>
<artifactId>api</artifactId>
<version>0.8.612</version>
</dependency>
<dependency>
<groupId>com.cognitect.aws</groupId>
<artifactId>endpoints</artifactId>
<version>1.1.12.321</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.cli</artifactId>
<version>1.0.214</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-transport-http</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-transport-file</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-resolver-provider</artifactId>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-android</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>data.xml</artifactId>
<version>0.2.0-alpha8</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-spi</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.gitlibs</artifactId>
<version>2.5.190</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-connector-basic</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>com.cognitect.aws</groupId>
<artifactId>s3</artifactId>
<version>822.2.1145.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-impl</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-util</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/clojure</sourceDirectory>
</build>
<repositories>
<repository>
<id>clojars</id>
<url>https://repo.clojars.org/</url>
</repository>
</repositories>
</project>
因此,1.11.1.1165 的输出是预期输出,但 1.11.1.1267 的行为不同。命令 clj -X:deps pom
也不工作。
这是否是 1.11.1.1267 中的一个错误还是合法行为?我如何从我的 deps.edn
中生成一个包含所有依赖的有效 pom.xml
文件?