Maven2 + Eclipse + Tomcatã®çµã¿åããã§èµ·åããã¾ã§
ããã¸ã§ã¯ãã®ã²ãªå½¢ãä½ã
ä»åã¯Wicket QuickStartã使ç¨ãã¦ã¿ã¾ããã
mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc4 -DgroupId=com.mycompany -DartifactId=myproject (ç¥)
Eclipseããã¸ã§ã¯ãç¨ã®è¨å®
maven-eclipse-pluginãm2eclipseã´ã¼ã«ã§å®è¡ãã¾ãã
eclipseã´ã¼ã«ã¨ã®éãã¯こちらãåç
§ã
cd myproject mvn eclipse:m2eclipse (ç¥)
Sysdeo Tomcat Pluginç¨ã®è¨å®
pom.xmlãéãã以ä¸ã®è¨è¿°ã追å ãã¾ãã
<build> (ç¥) <pluginManagement> <plugins> (ç¥) <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>sysdeo-tomcat-maven-plugin</artifactId> <version>1.1</version> </plugin> </plugins> </pluginManagement> <plugins> (ç¥) <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>sysdeo-tomcat-maven-plugin</artifactId> <version>1.1</version> </plugin> </plugins> </build>
sysdeo-tomcat-maven-pluginã使ç¨ãã¦è¨å®ãã¡ã¤ã«ãçæãã¾ãããã®ãã©ã°ã¤ã³ã«ã¯m2eclipseã´ã¼ã«ãããã¾ããããã¡ãã¯ä½¿ããã«generateã´ã¼ã«ã使ç¨ãã¾ãã2ã¤ã®éãã¯こちらãåç
§ã
mvn sysdeo-tomcat:generate (ç¥)
æ®å¿µãªãã¨ã«èªåã§ãã¬ã¤ã«åºã¦ã¯ãããªãã®ã§ãããã«æã§ä¿®æ£ãå ãã¾ãã
<webClassPathEntries> <webClassPathEntry>/myproject/target/classes</webClassPathEntry> <webClassPathEntry>M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar</webClassPathEntry> <webClassPathEntry>M2_REPO/org/apache/wicket/wicket/1.4-rc4/wicket-1.4-rc4.jar</webClassPathEntry> <webClassPathEntry>M2_REPO/org/slf4j/slf4j-api/1.4.2/slf4j-api-1.4.2.jar</webClassPathEntry> <webClassPathEntry>M2_REPO/org/slf4j/slf4j-log4j12/1.4.2/slf4j-log4j12-1.4.2.jar</webClassPathEntry> </webClassPathEntries>
ã¨ããé¨åã以ä¸ã®ããã«ä¿®æ£ãã¾ãã
<webClassPathEntries> <webClassPathEntry>/myproject/target/classes</webClassPathEntry> <webClassPathEntry>org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER</webClassPathEntry> </webClassPathEntries>
Tomcatã®ã¤ã³ã¹ãã¼ã«
ããããªã¨ããã«æ¸ããã¦ããã®ã§çç¥ã
ç¹å¥ãªäºæ
ããªããã°Tomcat6ç³»ãããã¾ãããã
Sysdeo Tomcat Pluginã®ã¤ã³ã¹ãã¼ã«
以ä¸ãããããã®ããã£ããã®ãã¤ã³ã¹ãã¼ã«ãã¾ãã
Sysdeo tomcat plugin にパッチあて - たぷつきません
æé ã¯åããçç¥ã
DevLoaderã®è¨å®
ä¸è¨ãããçã§ãDevLoaderã«åé¡ãããã®ã§ãããã¾ãå¥ã®ãããã®ããã£ããã®ãã¤ã³ã¹ãã¼ã«ãã¾ãã
http://jfut.featia.net/diary/20071117.html#p01
devloader-3.2.1ex.jarã%TOMCAT_HOME%\lib以ä¸ã«ã
devloader.confã%TOMCAT_HOME%\conf以ä¸ã«ããããã³ãã¼ãã¾ãã
ãã¨ã¯ãEclipseä¸ã§ããã¸ã§ã¯ããå³ã¯ãªãã¯ãã¦ãTomcatããã¸ã§ã¯ãâã³ã³ããã¹ãå®ç¾©ãæ´æ°ããå®è¡ãã
Tomcatãèµ·åããå¾ãhttp://localhost:8080/myproject-1.0-SNAPSHOTã«ã¢ã¯ã»ã¹ãã¦ç»é¢ã表示ãããã°å®äºã§ãã
ãã®ä»ã好ã¿è¨å®
- .tomcatpluginã®reloadableã¯HOT Deployãã§ããéçºç°å¢ã§ã¯falseã«ãã¾ãã
- .tomcatplguinã®webpathãå¤æ´ãã¦URLãããã¼ã¸ã§ã³çªå·ãåã£ãã»ããããã§ãã
- ã³ãã³ãã©ã¤ã³ããmvn cleanãªã©ãè¡ãã¨targetãã£ã¬ã¯ããªãã¨åé¤ããã¾ããããã®å ´åEclipseä¸ã§èªåã§åã³ã³ãã¤ã«ãè¡ãããªãã®ã§ãEclipseä¸ã®classesã¯workçã®å¥ãã£ã¬ã¯ããªã«ãã¦ããã¨ä¾¿å©ããã