Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Run two jetty server during maven integration-tests

Hi there

I've configured the maven jetty plugin thus it's started/stopped during the integration test phase of maven.

I haven't found a way to start two jetty servers. Is this possible?

    <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty.version}</version>
        <inherited>true</inherited>
        <configuration>
            <jettyConfig>target/test-classes/jetty/rp-server.xml</jettyConfig>
            <stopPort>${rp.stop.port}</stopPort>
            <stopKey>STOP</stopKey>
        </configuration>
        <executions>
            <execution>
                <id>start-jetty</id>
                <phase>pre-integration-test</phase>
                <inherited>true</inherited>
                <goals>
                    <goal>deploy-war</goal>
                </goals>
                <configuration>
                    <daemon>true</daemon>
                </configuration>
            </execution>
            <execution>
                <id>stop-jetty</id>
                <phase>post-integration-test</phase>
                <inherited>true</inherited>
                <goals>
                    <goal>stop</goal>
                </goals>
            </execution>
        </executions>
        <dependencies>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.16</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf.fediz</groupId>
                <artifactId>fediz-jetty</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </plugin>

Thanks
Oli


Back to the top