Maven+Selenium+Jetty - ClassNotFoundException when Jetty is Shutting Down Maven+Selenium+Jetty - ClassNotFoundException when Jetty is Shutting Down selenium selenium

Maven+Selenium+Jetty - ClassNotFoundException when Jetty is Shutting Down


Try adding a stopWait to the jetty configuration :

<configuration>  <scanIntervalSeconds>10</scanIntervalSeconds>  <stopKey>stop</stopKey>  <stopPort>8005</stopPort>  <stopWait>5</stopWait></configuration>

This ensures jetty stops before the next maven goal is executed and importantly before the build completes.

It's this case where Jetty is attempting shutdown when the Maven build has completed that you will see this ClassNotFoundError.

See also http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#jetty-stop-goal


I solved this, adding this dependency

        <dependency>            <groupId>org.mortbay.jetty</groupId>            <artifactId>jsp-2.1</artifactId>            <version>6.0.0</version>          </dependency>