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

前端 未结 7 2083
傲寒
傲寒 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:55

    Here is the working sample in pom.xml file.

        
            org.jacoco
            jacoco-maven-plugin
            ${jacoco.version}
    
    
            
                
                    prepare-agent
                    
                        prepare-agent
                    
                
                
                    post-unit-test
                    test
                    
                        report
                    
    
                
    
                
                    default-check
                    
                        check
                    
    
                
            
            
                target/jacoco.exec
                
                target/jacoco-ut
                
                    
                        PACKAGE
                        
                            
                                COMPLEXITY
                                COVEREDRATIO
                                0.00
                            
                        
                    
                
                
                    com/pfj/fleet/dao/model/**/*
                
                
    
                    target/jacoco.exec
                
            
        
    

提交回复
热议问题