要在测试阶段禁用缓存,需要输入命令:
mvn test -Dnet.sf.ehcache.disabled=true是否有任何方法将此属性"net.sf.ehcache.disabled“设置为默认值?(其中menas:每当我指定"mvn测试“时,我都想自动将这个参数"net.sf.ehcache.disabled”设置为true )
发布于 2014-06-12 09:39:16
您可以尝试在您的pom.xml中配置这样的强制插件:
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<net.sf.ehcache.disabled>true</net.sf.ehcache.disabled>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
...https://stackoverflow.com/questions/24179652
复制相似问题