0

I try to run two wars on jetty. I have got this configuration.

<groupId>org.mortbay.jetty</groupId>
    <artifactId>maven-jetty-plugin</artifactId>
    <version>6.1.14</version>
    <configuration>
        <scanIntervalSeconds>10</scanIntervalSeconds>
        <stopKey>foo</stopKey>
        <stopPort>9999</stopPort>
    </configuration>
    <executions>

        <execution>
            <id>start-jetty</id>
            <phase>pre-integration-test</phase>
            <goals>
                <goal>run-war</goal>
            </goals>
            <configuration>
                <contextPath>grc-webclient-app</contextPath>
                <webApp>${project.build.directory}/war/first.war</webApp>
                  <contextHandlers>
                    <contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
                        <war>${project.build.directory}/war/second.war</war>
                        <contextPath>rest.war</contextPath>
                        <daemon>false</daemon>
                        <scanIntervalSeconds>0</scanIntervalSeconds>
                    </contextHandler>
                </contextHandlers>
                <scanIntervalSeconds>0</scanIntervalSeconds>
                <daemon>false</daemon>
            </configuration>
        </execution>

However, only first.war is being deployed. Second.war is not deployed. What am I doing wrong.

Iurii Dziuban
  • 1,091
  • 2
  • 17
  • 31

1 Answers1

1

You are using an incredibly old version of the plugin.

Update to 7.6.3.v20120416 of the jetty-maven-plugin which I believe supports deploying multiple webapps like you are trying to do.

http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin

jesse mcconnell
  • 7,102
  • 1
  • 22
  • 33
  • Now I have got another problem: Class name which was explicitly given in configuration using 'implementation' attribute: 'org.mortbay.jetty.webapp.WebAppContext' cannot be loaded – Iurii Dziuban May 15 '12 at 07:16
  • class packaging changed in the migration to eclipse, this page shows the package renaming: http://wiki.eclipse.org/Jetty/Starting/Porting_to_Jetty_7/Packages_and_Classes – jesse mcconnell May 15 '12 at 12:24