質問

統合テスト(鉱山を使用するSelenium + JBehave)と停止の前に組み込みTomcatを開始し、

ここに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を実行してから[OK]をクリックして、ストーリーを実行させないようです...

誰もが助けになることができますか?

役に立ちましたか?

解決

私は解決策を見つけたと思います。次の設定で動作します。

<plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <fork>true</fork>
                </configuration>
                <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にフォークに伝える追加構成要素に注意してください。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top