31
Jan
10

Restarting Jetty Automatically using scanTargets


This page describes the process of setting up jetty such that it will restart when resources are changed.

By default jetty only scans a limited set of directories for changes. If you change a jsp or property file chances are that the changes wont be registered. If you find this happening then try something like this in your maven pom.xml file.

<plugin>
	<groupId>org.mortbay.jetty</groupId>
	<artifactId>maven-jetty-plugin</artifactId>
	<configuration>
		<scanTargetPatterns>
			<scanTargetPattern>
				<directory>src/main/webapp</directory>
				<includes>
					<include>**/*</include>
				</includes>
			</scanTargetPattern>
		</scanTargetPatterns>
		<scanIntervalSeconds>2</scanIntervalSeconds>
	</configuration>
</plugin>

Advertisements

0 Responses to “Restarting Jetty Automatically using scanTargets”



  1. Leave a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 78 other followers

January 2010
S M T W T F S
« Dec   Feb »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Blog Stats

  • 822,357 hits

%d bloggers like this: