Frage

Ich versuche, das Maven -Failsafe -Plugin zu verwenden, um meine Funktions-/Integrationstests auszuführen, so diese Anleitung: http://docsehaus.org/display/mavenuser/maven+and+IneInegation+Testing, Kapitel Verwenden des Maven -Failsafe -Plugins zum Ausführen von Integrationstests

Der Steg beginnt jedoch nicht in der Phase vor der Integrationstest und daher fehlen alle Tests. Gibt es ein Problem in der folgenden POM -Konfiguration:

<plugin>
    <artifactId>maven-failsafe-plugin</artifactId>
    <version>2.7.1</version>
    <executions>
      <execution>
        <goals>
          <goal>integration-test</goal>
          <goal>verify</goal>
        </goals>
      </execution>
    </executions>
</plugin>

<plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>maven-jetty-plugin</artifactId>
    <version>6.1.7</version>
    <configuration>

          <connectors>
            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
              <port>8080</port>
              <maxIdleTime>3600000</maxIdleTime>
            </connector>
          </connectors>

        <contextPath>/</contextPath>
        <scanIntervalSeconds>3</scanIntervalSeconds>
        <scanTargetPatterns>
            <scanTargetPattern>
                <directory>src/main/webapp/WEB-INF</directory>
                <excludes>
                    <exclude>**/*.jsp</exclude>
                    <exclude>**/*.html</exclude>
                </excludes>
                <includes>
                    <include>**/*.page</include>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </scanTargetPattern>
        </scanTargetPatterns>
        <execution>
            <execution>
                <id>start-jetty</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>run-exploded</goal>
                </goals>
                <configuration>
                  <scanIntervalSeconds>0</scanIntervalSeconds>
                  <daemon>true</daemon>
                </configuration>
            </execution>
            <execution>
                <id>stop-jetty</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
            </execution>
        </execution>

    </configuration>
</plugin>

Ich führe die Integrationstests von durch mvn verify

War es hilfreich?

Lösung

Ich weiß warum - zuerst habe ich das lege execution Tags in einem anderen execution Tag (statt executions) und dann das executions Block sollte nicht drinnen sein configuration Tag, aber außerhalb davon direkt in der plugin Schild.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top