Sun
Sun

Reputation: 3564

Checkstyle - reports not showing anything

Reports are created, but it is not having any checkstyle information(errors,...) It showing just project names and layout.

I added plugin in pom.xml

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

And i run mvn site command.

Then i am getting output:

[INFO] --- maven-site-plugin:3.0:site (default-site) @ parent-project ---
[INFO] configuring report plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.10
[WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
[WARNING] 
[INFO] There are 98008 checkstyle errors.
[WARNING] Unable to locate Source XRef to link to - DISABLED
[INFO] Generating "About" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Plugin Management" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Dependencies" report    --- maven-project-info-reports-plugin:2.7
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building sub-project1 1.4.0.2
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] 
[INFO] parent-project ..................................... SUCCESS [22.137s]
[INFO] sub-project1 ..................................... SUCCESS [13.183s]
[INFO] sub-project2 ....................................... SUCCESS [21.192s]
[INFO] sub-project3 .................................... SUCCESS [35.919s]
[INFO] sub-project4 ...................................... SUCCESS [31.328s]
[INFO] sub-project5 .................................... SUCCESS [35.976s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:39.955s
[INFO] Finished at: Thu Sep 12 18:49:32 IST 2013
[INFO] Final Memory: 64M/775M
[INFO] ------------------------------------------------------------------------

Upvotes: 1

Views: 3053

Answers (1)

Manish Tuteja
Manish Tuteja

Reputation: 205

You should add the maven-jxr-plugin to the reporting Plugin section.

<reporting>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jxr-plugin</artifactId>
            <version>2.3</version>
        </plugin>
    </plugins>
</reporting>

Upvotes: 2

Related Questions