JaCoCo not generating jacoco.exec until after skipping JaCoCo execution

后端 未结 6 1061
执念已碎
执念已碎 2021-02-19 00:27

I\'m having trouble generating AHP reports via JaCoCo in one of my modules. When the build starts, I see JaCoCo correctly setting argLine with:

[INFO] jacoco.age         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-19 01:08

    Just an addition to the answers already given. It could happen that in your maven-surefire-plugin configuration you already use the argLine configuration to override something like the memory used. If you do so the argline set by jacoco-maven-plugin will not be used failing to generate the jacoco report. In this case assign a property name to the jacoco-maven-plugin config and then reference it in your maven-surefire-plugin argLine parameter.

            
                org.jacoco
                jacoco-maven-plugin
                0.7.9
                
                    
                    
                        prepare-unit-tests
                        
                            prepare-agent
                        
                        
                            true
                            ${sonar.jacoco.reportPath}
                            
                            surefireArgLine
                        
                    
                
            
    

    [...]

            
                org.apache.maven.plugins
                maven-surefire-plugin
                2.19.1
                
                    false
                    true
                    3
                    true
                    ${surefireArgLine} -Xmx1024m -noverify                  
                
            
    

提交回复
热议问题