Maven cobertura plugin - one report for multimodule project

后端 未结 4 426
不思量自难忘°
不思量自难忘° 2021-01-05 01:40

I\'m using maven cobertura plugin to report code coverage in my multimodule project.

The problem is that I don\'t know how to generate one report for all modules in

4条回答
  •  花落未央
    2021-01-05 02:11

    The plugin has been updated since this question was asked (and last answered) to now enable aggregated reporting, via the aggregate configuration property in the parent POM.

    This produces the aggregated coverage report at target/site/cobertura/index.html which will include all modules.

    (Each module will also have it's own report produced, if that is of any use.)

    Parent pom.xml

    
        moduleA
        moduleB
        moduleC
    
    
        
            
                
                    org.codehaus.mojo
                    cobertura-maven-plugin
                    2.6
                    
                        
                        
                            html
                            xml
                        
                        true
                    
                
                ...
        
        
            
                org.codehaus.mojo
                cobertura-maven-plugin
            
        
    ...
    
    

提交回复
热议问题