在我的程序集描述符中,我有以下内容:
<dependencySets>
<dependencySet>
<outputDirectory>ext</outputDirectory>
<useTransitiveDependencies>false</useTransitiveDependencies>
<excludes>
<exclude>group1:artifact1:jar:${pom.version}</exclude>
<exclude>group2:artifact2:jar:${pom.version}</exclude>
</excludes>
</dependencySet>
</dependencySets>当运行mvn依赖项:tree时,我得到以下信息,例如:
[INFO] +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile我想实现的是,我只有字符串上下文在我的ext文件夹。当设置如上面所示的useTransitiveDependencies时,ext目录根本不存在,并且在删除属性时,我的ext文件夹中有所有的thress jars。
任何人都知道我怎样才能排除spring-aop和aopalliance。
乔纳斯
发布于 2018-12-06 08:26:17
将useTransitiveFiltering设置为true。如果在include/exclude中使用dependencySet,则应考虑此选项。
发布于 2013-02-13 10:11:00
我想说的是,春季语境对你来说应该是,不是一种暂时性的依赖,而是一种直接的依赖。
如果接受允许传递依赖项,则将要包含的依赖项的选择委托给依赖项POM。
发布于 2017-05-10 14:13:02
程序集描述符中有一个简单的条目:
<useTransitiveDependencies>false</useTransitiveDependencies> 这应该能解决你的问题
https://stackoverflow.com/questions/14846436
复制相似问题