What is the proper way to use Cobertura with Maven 3.0.2

前端 未结 3 1898
醉话见心
醉话见心 2020-12-30 00:51

I have been trying unsuccessfully for the last few days to run Cobertura 2.4 with Maven 3.0.2. We have a very large project with many modules (sub-projects). What I found is

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 01:16

    You can also integrate the Cobertura plugin in the section of your webapp:

      
        ${project.build.directory}/site
        
          
          
            org.apache.maven.plugins
            maven-project-info-reports-plugin
            2.7
            
              false
            
          
          
          
            org.codehaus.mojo
            cobertura-maven-plugin
            2.6
            
              
                true
              
              
                html
                xml
              
            
          
        
      
    

    If you run mvn site, then your report will be available in target/site/cobertura/index.html within the target directory of your application.

提交回复
热议问题