我正在尝试使用Qulice代码质量控制工具。
当我在项目上运行qulice:check
时,出现以下错误:
[WARNING] Found duplicate and different classes in [junit:junit:4.8.2,org.mockito:mockito-all:1.9.5] :
[WARNING] org.hamcrest.BaseDescription
[WARNING] org.hamcrest.BaseMatcher
[WARNING] org.hamcrest.CoreMatchers
[WARNING] org.hamcrest.Description
[WARNING] org.hamcrest.Factory
[WARNING] org.hamcrest.Matcher
[WARNING] org.hamcrest.SelfDescribing
[WARNING] org.hamcrest.StringDescription
[WARNING] org.hamcrest.core.AllOf
[WARNING] org.hamcrest.core.AnyOf
[WARNING] org.hamcrest.core.DescribedAs
[WARNING] org.hamcrest.core.Is
[WARNING] org.hamcrest.core.IsAnything
[WARNING] org.hamcrest.core.IsEqual
[WARNING] org.hamcrest.core.IsInstanceOf
[WARNING] org.hamcrest.core.IsNot
[WARNING] org.hamcrest.core.IsNull
[WARNING] org.hamcrest.core.IsSame
[WARNING] org.hamcrest.internal.ArrayIterator
[WARNING] org.hamcrest.internal.SelfDescribingValue
[WARNING] org.hamcrest.internal.SelfDescribingValueIterator
我尝试禁用这些检查,但根据Qulice GitHub,此功能尚未实现。
我可以做些什么才能摆脱这些错误?
答案 0 :(得分:1)
你能做的最好的就是:
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>duplicatefinder:.*</exclude>
</excludes>
</configuration>
</plugin>
例如,看看它是如何在rultor的pom.xml中完成的。你基本上禁用整个重复查找器检查。目前无法仅禁用一个工件。
PS。在您的特定情况下,您不需要禁用重复的查找程序。只需使用适当版本的JUnit,Mockito和Hamcrest,看看它是如何在jcabi-parent pom.xml中完成的。