1

初めてmaven checkstyleプラグインを使用しています。親 pom に checkstyle プラグインを追加し、checkstyle.xml でいくつかのルールのリストを指定しました。

レポートを生成するために「mvn clean site」を実行しています。すべてが正常に機能していますが、不要なレポートも多数生成されています。どうすれば防ぐことができますか。

「mvn clean checkstyle:checkstyle」を試しましたが、checkstyle.xml ルールを考慮していません。すなわち。すべてのデフォルト ルール違反のレポートも生成しています。

また、Web ページも適切に表示されません。すなわち。スタイル(.cssファイル)なしで.htmlファイルを生成するため、見た目が非常に悪くなります。

私のpom.xmlには

<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>
4

1 に答える 1

0

選択的レポートの実行

レポートを選択的に実行するには、好みのレポートのみを含めるように構成できます。選択したレポートを生成するには、「mvn site:site」を使用します。

<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>
于 2013-11-12T12:43:58.420 に答える