Fight the Future

Java言語とJVM、そしてJavaエコシステム全般にまつわること

eclipseのWTPでPublishingせずにHot Reloadingさせる

参考にさせていただいたサイト

WTPで毎回ワーキングフォルダをPublishingしにいってほしくない設定 - yummy-yummy http://d.hatena.ne.jp/uriyuri/20080328/1206694040

Serversに設定してあるTomcatの設定を変更
Over viewタブ設定
Server OptionsのServer modules without publishingにチェック
Automatic PublishingのNerver publishing automaticallyにチェック
Modulesタブ設定
該当プロジェクトのAuto ReloadをDisabledに変更

WTPで毎回ワーキングフォルダをPublishingしにいってほしくない設定 - yummy-yummy

「Server modules without publishing」はこういう意味らしいです。

The Serve modules without publishing option does what it says. Web content will be served directly from the "WebContent" folder of the Dynamic Web Project. A customized context is used to make the project's dependencies available in the Web application's classloader.

Maveneclipse:eclipseしたときとか、毎度クラスファイルの出力場所を変えるのは面倒なので、以下の設定をします。

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-eclipse-plugin</artifactId>
	<configuration>
		<buildOutputDirectory>src/main/webapp/WEB-INF/classes</buildOutputDirectory>
	</configuration>
</plugin>