soap ui pro maven插件的全局属性命令行配置

时间:2015-06-01 09:55:37

标签: maven plugins soapui

我想知道是否有办法通过将值作为命令行参数传递来覆盖soapui-settings.XML文件中的全局属性值。这是参考使用soapUI pro maven插件而不是使用soapUI的命令行版本。

1 个答案:

答案 0 :(得分:0)

您必须使用Maven属性作为中介。

确定SoapUI插件:

        <plugin>
            <groupId>com.smartbear.soapui</groupId>
            <artifactId>soapui-pro-maven-plugin</artifactId>
            <version>.....</version>
            <executions>
                <execution>
                    <configuration>
                        <projectFile>.....</projectFile>
                        <projectProperties>
                            <value>property1=${soapui.value1}</value>
                        </projectProperties>
                    </configuration>
                </execution>
            </executions>
        </plugin>

你的pom中定义属性:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <soapui.value1>soapui.actual.value</soapui.value1>
</properties>

然后你可以从命令行调用它,如:

mvn -Dsoapui.value1=soapui.other.value com.smartbear.soapui:soapui-pro-maven-plugin:test