如何禁用Qulice中的重复依赖项检查? [英] How to disable duplicate dependencies check in Qulice?
问题描述
我正在尝试使用 Qulice 代码质量控制工具.
I'm trying to use the Qulice code quality control tool.
在我的pom.xml
中,我具有以下定义:
In my pom.xml
I have the following definition:
<build>
<plugins>
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>0.12.1</version>
<configuration>
<license>file:${basedir}/LICENSE.txt</license>
<exclude>duplicatefinder:com.github.kodapan</exclude>
<exclude>dependencies:com.github.kodapan</exclude>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
当我运行qulice:check
时,由于以下问题,构建失败:
When I run qulice:check
, the build fails because of these problems:
[WARNING] Found duplicate (but equal) classes in [com.github.kodapan:osm-common.core:v0.0.2,se.kodapan.osm.common:core:0.0.2-SNAPSHOT] :
[WARNING] se.kodapan.lang.Intern
[WARNING] se.kodapan.osm.domain.OsmObjectVisitor
[WARNING] se.kodapan.osm.domain.root.AbstractRoot
[WARNING] se.kodapan.osm.domain.root.Root
尽管存在这些问题,如何修改上面的exclude
定义以使构建成功(目前,解决类路径问题已成问题)?
How can I modify the exclude
definition above in order for the build to succeed despite these problems (right now, fixing the classpath is out of question)?
推荐答案
插件部分可以管理(对于该插件)依赖项,尤其是排除项.
The plugins section in a POM allows to manage the dependencies (for that plugin), especially exclusions.
所以配置看起来像这样:
So the configuration looks something like that:
<build>
<plugins>
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>0.12.1</version>
<configuration>...</configuration>
<executions>...</executions>
<dependencies>
<dependency>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>...</version>
<exclusions>
<exclusion>
<groupId>...</groupId>
<artifactId>...</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
在这里,您必须配置应排除哪些直接依赖项中的哪些传递性依赖项.
Here you have to configure which transitive dependencies of what direct dependencies should be excluded.
这篇关于如何禁用Qulice中的重复依赖项检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!