蚂蚁风格模式的问题包括和maven-failsafe-plugin

时间:2013-09-22 14:28:05

标签: maven ant maven-failsafe-plugin

我拼命想让maven failafe插件运行我的集成测试。

我已按如下方式配置插件:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.16</version>
        <executions>
            <execution>
                <id>failsafe-itest</id>
                <phase>integration-test</phase>
                <goals>
                    <goal>integration-test</goal>
                </goals>
                <configuration>
                    <skip>false</skip>
                    <includes>
                        <include>**/integration/**</include>
                    </includes>
                </configuration>
            </execution>
        </executions>
    </plugin>

我在以下包中有一个集成测试:

com.bignibou.tests.integration.repository.advertisement

但是,mvn-failsafe-plugin 无法提取

我的include语法出了什么问题?

1 个答案:

答案 0 :(得分:0)

更改为:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.16</version>
                <configuration>
                    <skip>false</skip>
                    <includes>
                        <include>**/integration/**</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>failsafe-itest</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <includes>
                                <include>**/integration/**</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

对问题进行排序。

但是,我必须使用mvn failsafe:integration-test运行插件本身才能运行集成测试并将单元测试短路!