【发布时间】:2018-10-16 11:21:25
【问题描述】:
我想跳过 **/dto/Q[A-Z]** 之后的包中所有文件的 PMD 违规,例如对于com.abc.foo.bar.dto.QResult.java,必须跳过 PMD 违规,但对于 com.abc.foo.bar.dto.Question.java 则不能
有人可以指出 pom.xml 中允许的正则表达式符号吗?我怎样才能达到上述目的?以下是我尝试过但没有奏效的方法-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<analysisCache>true</analysisCache>
<!-- enable incremental analysis -->
<excludes>
<exclude>*/dto/Q[A-Z]**</exclude>
</excludes>
</configuration>
</plugin>
【问题讨论】: