【问题标题】:regexp notation for pom.xmlpom.xml 的正则表达式表示法
【发布时间】: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>

【问题讨论】:

    标签: java maven ant


    【解决方案1】:

    我会试试的

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

    (或开头的**)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多