【问题标题】:Surefire system property not being set未设置 Surefire 系统属性
【发布时间】:2015-03-05 11:52:51
【问题描述】:

我正在尝试让我们的 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 测试则不会。为什么我的系统属性在这里被忽略了?

【问题讨论】:

  • 你尝试过旧方法吗? propertyNamepropertyValue [...]

标签: maven junit mule maven-surefire-plugin


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-02
    • 2017-11-04
    • 1970-01-01
    • 2014-02-04
    相关资源
    最近更新 更多