Tomcat intégré ne laissera pas mes histoires de sélénium / jbehave courir
-
11-12-2019 - |
Question
J'essaie du tomcat
Voici comment j'ai essayé de configurer 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>
Cependant, Tomcat commence ok lorsque je gère mvn integration-test
et il semble que cela ne laisse pas mes histoires courir ...
Quelqu'un peut-il aider?
La solution
Je pense que j'ai trouvé la solution.Il fonctionne avec la configuration suivante:
<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>
Notez l'élément de configuration supplémentaire