문제

I am first time using maven checkstyle plugin. I added checkstyle plugin in parent pom and i specified some list of rules in checkstyle.xml.

I running "mvn clean site" to generate reports. Every thing working fine, but it generating lot of not needed reports also. how can i prevent.

I tried "mvn clean checkstyle:checkstyle", but it not considering my checkstyle.xml rules. ie. it is generating reports all default rules violations also.

And the web page also not appearing proper. ie. it generating .html file with out styles(.css file) so it looks very bad.

in my pom.xml is

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.10</version>
            </plugin>
        </plugins>

    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.10</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

올바른 솔루션이 없습니다

다른 팁

Run Selective Reports

To run the reports selectively, you can configure it to include only the reports that you prefer. Use "mvn site:site" to generate the selected reports.

<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependencies</report>
              <report>project-team</report>
              <report>mailing-list</report>
              <report>cim</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
</project>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top