Hi Suchitra,

Now, I can give an example. You have to check for the version of the plugins
(I think, some have new version) and change the configuration for your
context :

   <build>
       <plugins>

           [...]

           <!-- Checkstyle plugin -->
           <!-- cf.
http://maven.apache.org/plugins/maven-checkstyle-plugin/howto.html -->
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-checkstyle-plugin</artifactId>
               <version>2.1</version>
               <executions>
                   <execution>
                       <id>checkstyle</id>
                       <phase>pre-site</phase>
                       <goals>
                           <goal>checkstyle</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>

           <!-- FindBugs plugin -->
           <!-- cf. http://mojo.codehaus.org/findbugs-maven-plugin/ -->
           <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>findbugs-maven-plugin</artifactId>
               <version>1.0-SNAPSHOT</version>
               <executions>
                   <execution>
                       <id>findbugs</id>
                       <phase>pre-site</phase>
                       <goals>
                           <goal>findbugs</goal>
                       </goals>
                   </execution>
               </executions>
               <configuration>
                   <xmlOutput>true</xmlOutput>
               </configuration>
           </plugin>

           <!-- PMD plugin -->
           <!-- cf.
http://maven.apache.org/plugins/maven-pmd-plugin/index.html -->
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-pmd-plugin</artifactId>
               <executions>
                   <execution>
                       <id>pmd</id>
                       <phase>pre-site</phase>
                       <goals>
                           <goal>pmd</goal>
                           <goal>cpd</goal>
                       </goals>
                   </execution>
               </executions>
               <configuration>
                   <!-rulesets>
                       <ruleset>${basedir}/src/main/pmd/your-pmd-rules.xml
</ruleset>
                   </rulesets-->
                   <linkXref>true</linkXref>
                   <targetJdk>1.5</targetJdk>
                   <format>xml</format>
               </configuration>
           </plugin>

           <!-- Cobertura Report                      -->
           <!-- cf.
http://maven-plugins.sourceforge.net/maven-cobertura-plugin/ -->
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>cobertura-maven-plugin</artifactId>
             <executions>
               <execution>
                 <id>cobertura</id>
                 <phase>pre-site</phase>
                 <goals>
                   <goal>cobertura</goal>
                </goals>
                 <configuration>
                   <formats>
                     <format>xml</format>
                     <format>html</format>
                  </formats>
                </configuration>
              </execution>
            </executions>
          </plugin>
       </plugins>
   </build>

   <reporting>
       <plugins>

           [...]

           <!-- QALab Report -->
           <!-- cf.
http://qalab.sourceforge.net/multiproject/maven2-qalab-plugin/faq.html -->
            <plugin>
               <groupId>net.objectlab</groupId>
               <artifactId>mvn-qalab-plugin</artifactId>
               <version>2.2</version>
               <reportSets>
                 <reportSet>
                   <reports>
                       <report>report-merge-chart</report>
                       <report>report-movers-all</report>
                   </reports>
                 </reportSet>
               </reportSets>
               <configuration>
                   <dateOnly>true</dateOnly>
                   <startTimeHoursOffset>50</startTimeHoursOffset>
               </configuration>
           </plugin>

           <!-- Cobertura Report                      -->
           <!-- cf.
http://maven-plugins.sourceforge.net/maven-cobertura-plugin/ -->
           <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>cobertura-maven-plugin</artifactId>
                  <version>2.1-SNAPSHOT</version>
           </plugin>

           <!-- Checkstyle Report                 -->
           <!-- cf.
http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html -->
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-checkstyle-plugin</artifactId>
               <version>2.1</version>
           </plugin>

           <!-- PMD Report                        -->
           <!-- cf.
http://maven.apache.org/plugins/maven-pmd-plugin/howto.html -->
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-pmd-plugin</artifactId>
               <configuration>
                   <targetjdk>1.5</targetjdk>
                   <!--rulesets>
                       <ruleset>${basedir}/src/main/pmd/your-pmd-rules.xml
</ruleset>
                   </rulesets-->
                   <format>xml</format>
                   <linkXref>true</linkXref>
                   <sourceEncoding>iso-8859-1</sourceEncoding>
                   <minimumTokens>100</minimumTokens>
               </configuration>
           </plugin>
        </plugins>
   </reporting>

I haven't try simian because it is non-open source.

HTH,

Rémy

Reply via email to