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

前端 未结 10 413
深忆病人
深忆病人 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

    If your project already uses the argLine to configure the surefire-maven-plugin, be sure that argLine defined as a property, rather than as part of the plugin configuration. For example:

      
        -your -extra -arguments
      
      ...
      
        org.apache.maven.plugins
        maven-surefire-plugin
        
          
        
      
    

    Resulting coverage information is collected during execution and by default written to a file when the process terminates.

    Worked for me. See: http://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html

提交回复
热议问题