maven - Why does jetty server hangs after server start and doesn't run integration test? -


i running integration test using maven-jetty-plugin , maven-failsafe-plugin. here's configuration:

   <plugin>             <artifactid>maven-failsafe-plugin</artifactid>             <version>2.7.1</version>             <executions>               <execution>                 <id>integration-test</id>                 <goals>                   <goal>integration-test</goal>                 </goals>               </execution>               <execution>                 <id>verify</id>                 <goals>                   <goal>verify</goal>                 </goals>               </execution>              </executions>         </plugin>          <plugin>             <groupid>org.mortbay.jetty</groupid>             <artifactid>maven-jetty-plugin</artifactid>             <version>6.1.26</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>             </configuration>             <executions>                     <execution>                         <id>start-jetty</id>                         <phase>pre-integration-test</phase>                         <goals>                           <goal>run-war</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>           </executions>         </plugin> 

when run mvn clean install, jetty server starts , after nothing happens (it gets stuck). last line in logs : [info] started jetty server. when press control-c, here prints:

2013-04-25 15:24:16.315:info::shutdown hook executing 2013-04-25 15:24:16.317:info::stopped selectchannelconnector@0.0.0.0:8080 2013-04-25 15:24:16.821:info:/ca-app:shutting down log4j 2013-04-25 15:24:16.821:info:/ca-app:closing spring root webapplicationcontext 2013-04-25 15:24:22.108:info::shutdown hook complete[info]  jetty server exiting. [info]  [info] --- maven-failsafe-plugin:2.7.1:integration-test (default) @ my-app --- [info] failsafe report directory: my-app/target/failsafe-reports  -------------------------------------------------------  t e s t s ------------------------------------------------------- running testsuite there no tests run.  results :  tests run: 0, failures: 0, errors: 0, skipped: 0  [warning] file encoding has not been set, using platform encoding macroman, i.e. build platform dependent! [info]  [info] --- maven-jetty-plugin:6.1.26:stop (stop-jetty) @ my-app --- [info]  [info] --- maven-failsafe-plugin:2.7.1:verify (default) @ my-app --- [info] killing jetty [info] failsafe report directory: my-app/target/failsafe-reports [warning] file encoding has not been set, using platform encoding macroman, i.e. build platform dependent! [info]  [info] --- maven-install-plugin:2.3.1:install (default-install) @ my-app --- [info] installing my-app/target/ca-app-0.1.5-snapshot.war ~/.m2/....../my-app/0.1.5-snapshot/my-app-0.1.5-snapshot.war [info] installing my-app/pom.xml ~/.m2/....../my-app/0.1.5-snapshot/my-app-0.1.5-snapshot.war [info]  [info] --- maven-dependency-plugin:2.1:sources (install) @ my-app --- 

why stuck? when press control-c, why perform rest of steps? how can fix it?

try using start instead of run-war.

from javadoc on org\eclipse\jetty\jetty-maven-plugin\9.3.0.m2\jetty-maven-plugin-9.3.0.m2.jar!\org\eclipse\jetty\maven\plugin\abstractjettymojo.nonblocking


determines whether or not server blocks when started. default behavior (false) cause server pause other processes while continues handle web requests. useful when starting server intent work interactively. behaviour of jetty:run, jetty:run-war, jetty:run-war-exploded goals. if true, server not block execution of subsequent code. behaviour of jetty:start , default behaviour of jetty:deploy goals.



Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -