Jimmy Lee Notes Take notes, Reading...

checkstyle-config

2019-11-19
Jimmy Lee

checkstyle maven plus 配置

指定checkstyle配置的位置

参考:apache maven checkstyle

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <configLocation>${你项目的路径}/checkstyle.xml</configLocation>
        </configuration>
      </plugin>

指定生成的报告的html使用的style

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>transform</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <transformationSets>
            <transformationSet>
              <dir>${project.basedir}/target</dir>
              <stylesheet>${你项目的路径}/checkstyle.xsl</stylesheet>
            </transformationSet>
          </transformationSets>
        </configuration>
      </plugin>



Similar Posts


上一篇 io-note

下一篇 sprin-refresh


Comments