【问题标题】:Specify Platform Name on a POM XML surefire plugin在 POM XML 万无一失的插件上指定平台名称
【发布时间】:2018-08-20 13:56:45
【问题描述】:

我正在尝试在 Windows 10 环境中使用 Intellij IDEA 为 Parallel Mobile 自动化设置 this project。当我从 IDE 终端使用指定的命令“mvn clean -Dtest=Runner test -DPlatform=android”运行项目时,我有以下输出:

[INFO] 运行 com.appium.tests.Runner [错误] 测试运行:1,失败: 1,错误:0,跳过:0,经过的时间:0.247 秒

在我的 POM.XML 上的surefire插件下,我将其作为属性变量 ${Platform} 被 IDEA 识别,并出现错误“无法解析符号‘平台’”

       <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.0</version>
            <configuration>
                <properties>
                    <Platform>${Platform}</Platform>
                </properties>
            </configuration>
        </plugin>

任何帮助将不胜感激。

【问题讨论】:

    标签: java android maven appium


    【解决方案1】:

    试试systemPropertyVariables

    <systemPropertyVariables>
                <Platform>${Platform}</Platform>
    </systemPropertyVariables>
    

    【讨论】:

      猜你喜欢
      • 2012-03-13
      • 1970-01-01
      • 2016-06-24
      • 1970-01-01
      • 2019-06-04
      • 1970-01-01
      • 2011-05-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多