Maven Jacoco Configuration - Exclude classes/packages from report not working

前端 未结 7 2088
傲寒
傲寒 2020-11-28 21:00

I have a maven multi-module project and I\'m using jacoco-maven for code coverage reports. Some classes should not be reported, as they\'re Spring configuration and I\'m not

7条回答
  •  难免孤独
    2020-11-28 21:40

    Another solution:

    
        org.jacoco
        jacoco-maven-plugin
        0.7.5.201505241946
        
            
                default-prepare-agent
                
                    prepare-agent
                
            
            
                default-report
                prepare-package
                
                    report
                
            
            
                default-check
                
                    check
                
                
                    
                        
                            
                                com.mypackage1com.mypackage2
                            
                            PACKAGE
                            
                                
                                    COMPLEXITY
                                    COVEREDRATIO
                                    0.85
                                
                            
                        
                    
                
            
        
    
    

    Please note that, we are using "PACKAGE" in the configuration which then helps us to exclude at package level.

提交回复
热议问题