Cannot use jacoco JVM args and surefire JVM args together in maven

前端 未结 10 523
深忆病人
深忆病人 2020-11-30 01:48

I am using maven with the jacoco plugin to generate code coverage metrics. I am having some difficulty in configuring the surefire plugin with the java opt

10条回答
  •  隐瞒了意图╮
    2020-11-30 02:16

    Update the POM.xml as

    
        org.jacoco
        jacoco-maven-plugin
        0.7.7.201606060606
        
          
            
                prepare-agent
            
          
          
                report
                prepare-package
                
                  report
                
          
        
    
    
    
          maven-surefire-plugin
          2.12.1
          
             ${argLine} -XX:PermSize=256m -XX:MaxPermSize=1048m 
          
    
    

    and then the most important thing is to run the Maven project with goals: mvn jacoco:prepare-agent clean test jacoco:report

提交回复
热议问题