Surefire系统属性未设置

时间:2015-03-02 04:25:52

标签: maven junit mule maven-surefire-plugin

我正在尝试使用详细的异常运行我们的Mule测试,但我无法使用surefire插件正确设置相应的系统属性,这是我的surefire配置:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.18.1</version>
            <configuration>
                <systemPropertyVariables>
                    <mule.verbose.exceptions>true</mule.verbose.exceptions>
                </systemPropertyVariables>
            </configuration>

现在,如果我使用命令-Dmule.verbose.exceptions = true运行maven,它将打印详细的异常,但如果我执行简单的mvn测试则不会。为什么我的系统属性会被忽略?

1 个答案:

答案 0 :(得分:1)

我没有检查过代码,但可能是由在surefire初始化之前执行的静态检查引起的。我宁愿尝试documentation中描述的特殊变量机制。

相关问题