Created
February 22, 2012 14:42
-
-
Save kdabir/1885388 to your computer and use it in GitHub Desktop.
Configuring jetty plugin to auto deploy and store session between restarts in Maven
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.mortbay.jetty</groupId> | |
<artifactId>maven-jetty-plugin</artifactId> | |
<version>6.1.24</version> <!-- TODO upgrade to version 7 --> | |
<configuration> | |
<stopPort>9669</stopPort> | |
<stopKey>${appname}</stopKey> | |
<!-- Redeploy every x seconds if changes are detected, | |
0 for no automatic redeployment --> | |
<scanIntervalSeconds>3</scanIntervalSeconds> | |
<connectors> | |
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> | |
<port>7770</port> | |
<maxIdleTime>60000</maxIdleTime> | |
</connector> | |
</connectors> | |
<webAppConfig> | |
<contextPath>/${appname}</contextPath> | |
<sessionHandler implementation="org.mortbay.jetty.servlet.SessionHandler"> | |
<sessionManager implementation="org.mortbay.jetty.servlet.HashSessionManager"> | |
<storeDirectory>${project.build.directory}/sessions</storeDirectory> | |
</sessionManager> | |
</sessionHandler> | |
</webAppConfig> | |
</configuration> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice! Just what I was looking for :-)