I am writing an application that uses GWT, some Spring MVC and Spring Security. Maven is be used to manage the dependencies and Eclipse is my IDE. I've created my application as follows:
webAppCreator -noant -maven -XnoEclipse -out MyApp com.example.MyApp
Then I've imported it into Eclipse as follows:
- Imported as Maven project into Eclipse workspace.
- In the project settings the "Use Google Web Toolkit" checkbox is ticked.
- This project has a WAR directory" is checked. The WAR directory is set to src/main/webapp. The "Launch and deploy from this directory" is unchecked.
Then I test it's all OK:
- Click run/debug, choose Web Application (the Google choice), and select target/www as the WAR directory.
So far, so good. Now I want to know how to control the development cycle. For example, I now want to add Spring to my application so I add this block to pom.xml and save it. The Maven Dependencies in Eclipse are expanded to show many new jars (Spring and its dependencies).
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
I also edit the web.xml to configure the Spring DispatcherServlet...
Once I've edited pom.xml and web.xml, clicking the debug/run icon on the toolbar will simply run from target/www again without any other steps taking place. This means the old web.xml is used, and target/www/WEB-INF/lib doesn't contain the Spring jars (and Spring's dependent jars). Do I need to drop to the command-line and issue Maven commands whenever particular changes are made?
The ideal answer will describe the development cycle for the above scenario.
My configuration:
GWT: 2.1.
Eclipse: Helios (3.6).
Maven: 2.2.1.
JRE/JDK: JDK 1.6.0.21.
Google Plugin for Eclipse 3.6 version 1.4.0.v201010280102.
Maven Integration for Eclipse (m2eclipse) version 0.10.2.20100623-1649 (this has been configured to point to Maven 2.2.1 environment and NOT to use the embedded Maven3 "instance").