gpt4 book ai didi

java - 我如何知道哪个 Maven 依赖项负责将 jar 包含在我的 WAR 文件中?

转载 作者:行者123 更新时间:2023-12-02 05:57:41 25 4
gpt4 key购买 nike

我运行 mvn dependency:list

然后我得到:

[INFO] The following files have been resolved:
....
[INFO] org.springframework:spring-aop:jar:3.2.8.RELEASE:compile
[INFO] org.springframework:spring-beans:jar:3.2.8.RELEASE:compile
[INFO] org.springframework:spring-context:jar:3.2.8.RELEASE:compile
[INFO] org.springframework:spring-core:jar:4.0.3.RELEASE:compile
[INFO] org.springframework:spring-expression:jar:3.2.8.RELEASE:compile
[INFO] org.springframework:spring-jdbc:jar:3.2.8.RELEASE:compile
[INFO] org.springframework:spring-orm:jar:3.2.8.RELEASE:compile
[INFO] org.springframework:spring-oxm:jar:4.0.3.RELEASE:compile
[INFO] org.springframework:spring-test:jar:4.0.3.RELEASE:compile
[INFO] org.springframework:spring-tx:jar:3.2.8.RELEASE:compile
[INFO] org.springframework:spring-web:jar:4.0.3.RELEASE:compile
[INFO] org.springframework.data:spring-data-commons:jar:1.7.1.RELEASE:compile
[INFO] org.springframework.data:spring-data-jpa:jar:1.5.1.RELEASE:compile

如何确定哪个依赖项负责 Spring 3 jar,因为我只希望版本 4 jar 存在。

谢谢!

最佳答案

正在运行dependency:tree而不是 dependency:list 将显示项目的依赖关系树,这应该揭示 Spring 3 依赖关系的起源。

以下是依赖树输出的示例:

[INFO] [dependency:tree]
[INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT
[INFO] +- org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4:compile
[INFO] | \- commons-validator:commons-validator:jar:1.2.0:compile
[INFO] | \- commons-digester:commons-digester:jar:1.6:compile
[INFO] | \- (commons-collections:commons-collections:jar:2.1:compile - omitted for conflict with 2.0)
[INFO] \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha-8:compile
[INFO] \- org.codehaus.plexus:plexus-velocity:jar:1.1.3:compile
[INFO] \- commons-collections:commons-collections:jar:2.0:compile

关于java - 我如何知道哪个 Maven 依赖项负责将 jar 包含在我的 WAR 文件中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22945589/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com