代码之家  ›  专栏  ›  技术社区  ›  baruchiro

PON和命令行中的Surefire配置

  •  0
  • baruchiro  · 技术社区  · 5 年前

    Maven Surefire Plugin 文档:

    如果您在POM中的surefire插件中配置了多个执行,您可能希望执行唯一的默认测试阶段: mvn surefire:test -Dtest=TestCircle

    我不明白POM配置和命令行之间的优先级/覆盖是什么。

    我有这些插件配置在我的 pom.xml :

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M4</version>
        <configuration>
            <includes>
                <include>**/*.java</include>
            </includes>
        </configuration>
    </plugin>
    

    现在我试着用

    mvn test -Dsurefire.includesFile=.\Path\To\includesFile -Denv=IsProfileValueTag
    

    我只期待在 includesFile 运行,但所有测试 IsProfileValueTag 跑步。

    0 回复  |  直到 5 年前