JMockit - initialization problem

后端 未结 7 1258
情话喂你
情话喂你 2020-12-01 20:33

When I use the following test I get a WARNING:

WARNING: JMockit was initialized on demand, which may cause certain tests to fail; please check the d

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 21:23

    In addition to Gary Rowe's solution:

    A more robust (i.e. version and repository path agnostic) integration of JMockit into Surefire would be

    -javaagent:${org.jmockit:jmockit:jar}
    

    To make this resolution work, the maven-dependency-plugin (version >= 2.5.1!) needs to be configured like this:

    
    maven-dependency-plugin
    2.5.1
    
        
            getClasspathFilenames
            
                properties
            
        
    
    

提交回复
热议问题