POM的正则表达式表示法.xml



我想跳过软件包中所有文件的 PMD 违规**/dto/Q[A-Z]**例如,必须跳过 PMD 违规com.abc.foo.bar.dto.QResult.java但不能跳过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>

我会尝试

<exclude>*/dto/Q{matcher:[A-Z]}**</exclude>

(或开头的 **(。