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