我正在尝试让嵌入式 tomcat 在集成测试之前启动(我使用 Selenium + JBehave)并在之后停止。
以下是我尝试配置 maven 的方法:
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.0</version>
            <executions>
                <execution>
                    <id>start-tomcat</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
                <execution>
                    <id>stop-tomcat</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>stop</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
但是,当我运行时,Tomcat 启动正常mvn integration-test,似乎它不会让我的故事运行......
任何人都可以帮忙吗?