ItEr15S04ArquitecturaServidorItEr14S04 Update to Maven Jetty plugin 6.1.18.

The Maven Jetty plugin has been updated to version 6.1.18. Apart from being a more stable version that the previous one (6.1.12.rc2), it adds the <reload> configuracion option (available from version 6.1.18 onwards). In particular, the plugin has been configured with <reload>manual</reload>. This way Jetty does not scan for changes to project files. Instead, it is necessary to hit "ENTER" key on the Jetty console whenever we want Jetty to reload the application.

Manual reloading has a number of advantages over automatic reloading:

+ ZK can manage by itself the reloading of .zul pages (without intervertion of Jetty).

+ Whenever a developer creates/modifies "n" non ZK-managed files (e.g. .java files) to develop/fix a feature, she/he hits RETURN (after all modifications are done) to verify the changes, causing Jetty to reload the application only once (instead of "n" times when using automatic reloading).

Minimizing the number of times Jetty reloads the application is important, since class loaders do not release memory properly after reloading (in consequence, after a number of reloads, Jetty must be restarted; as usual, JVM memory options can also be used to increase available memory if desired).
This commit is contained in:
Fernando Bellas Permuy 2009-07-01 15:52:39 +02:00 committed by Javier Moran Rua
parent fd127d81e7
commit 9f8cf27610

21
pom.xml
View file

@ -435,19 +435,10 @@
<groupId>org.mortbay.jetty</groupId> <groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId> <artifactId>maven-jetty-plugin</artifactId>
<!-- FIXME: try to not to specify version. --> <version>6.1.18</version>
<version>6.1.12.rc2</version>
<configuration> <configuration>
<jettyEnvXml>target/jetty/jetty-env.xml</jettyEnvXml> <jettyEnvXml>target/jetty/jetty-env.xml</jettyEnvXml>
<scanIntervalSeconds>5</scanIntervalSeconds> <reload>manual</reload>
<scanTargetPatterns>
<scanTargetPattern>
<directory>src/main/webapp/WEB-INF</directory>
<includes>
<include>*</include>
</includes>
</scanTargetPattern>
</scanTargetPatterns>
<!-- Log to the console. --> <!-- Log to the console. -->
<requestLog implementation="org.mortbay.jetty.NCSARequestLog"> <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
@ -459,9 +450,11 @@
<append>true</append> <append>true</append>
</requestLog> </requestLog>
<!-- <!--
<connectors> <connector <connectors>
implementation="org.mortbay.jetty.nio.SelectChannelConnector"> <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>9090</port> </connector> </connectors> <port>9090</port>
</connector>
</connectors>
--> -->
</configuration> </configuration>