Maven JaCoCo plugin error

后端 未结 5 1281
温柔的废话
温柔的废话 2020-12-05 05:01

I have configured the Maven JaCoCo plugin as follows in my pom.xml file:


    UTF-8         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 05:48

    I use configuration:

        
            org.jacoco
            jacoco-maven-plugin
            ${jacoco.version}
                
                        ${skipTests}
                
                
                        
                                    jacoco-initialize
                                    initialize
                                    
                                        prepare-agent
                                    
                                
                                
                                    jacoco-site
                                    package
                                    
                                        report
                                    
                                
                
            
    

    Update: Configuration generated by sonar (sonar-pom.xml):

    
            maven-surefire-plugin
            2.12
            
              
                default-test
                test
                
                  test
                
                
                  server,ignore,integration
                
              
            
            
              server,ignore,integration
              -javaagent:/tmp/jacocoagent3671192291664069011.jar=destfile=target/jacoco.exec,excludes=*_javassist_*
              true
            
          
    

    One problem - how to define "jacocoagent3671192291664069011.jar" for each build. It should be in:

    $M2_HOME/repository/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar
    

提交回复
热议问题