I. Creating a MAVEN Project
- Select File->new->other->maven->maven Project in the Eclipse's menu bar
- Next, choose Create a simple project (skip archetype selection),
- After entering group Id,archive id,packaging after the next step, click Finish,
- After the successful creation of the file directory,
Two. Dynamic Web Project converted to Java
- Right-click the project name and select Properties
- Select Project Facets->convert to faceted from ...,
- Choose dynamic Web module,version to 2.5 (3.0 version I have not tested is feasible), select Java,version to 1.6, and click further configuration available ...
- To modify content directory to/src/main/webapp/, click OK,
- Finally click Properties for showcase OK to complete the conversion, the last directory structure,
Three. Modify the Java Build Path
- Right-click the project name and select Properties
- Select Java build Path, remove the JRE 1.5 version, then click the Add Library,
- Select the JRE System Library, click Next,
- Select the Jdk6 version you set, click Finish,
- Finally click OK to complete the setup,
Four. Modify the Java Compile
- Right-click the project name and select Properties
- Select Java Compiler, and select Compiler compliance level of 1.6,
Five. Modify Deployment Assembly
- Right-click the project name and select Properties
- Select Deployment Assembly, and click Add,
- Select Java Build Path Entries, click Next,
- Select Maven Dependencies, click Finish,
- It is best to click OK to complete the setup,
Six. Set up server Apache Tomcat
- Menu Bar Select Window->show view->servers
- Click the New Server Wizard,
- Select Tomcat v6.0 Server, click Next,
- Select Browse, select the correct Apache Tomcat installation directory, then click Next,
- Select the project you want to deploy, such as Showcase, then click Add, click Finish,
Xxx
Attention:
Prompt for this when add and remove: Tomcat version 6.0 only supports EE 1.2, 1.3, 1.4, and Java EE 5 Web Modules
- After you have finished setting up the project
- On Servers view, double-click Tomat v6.0 Server at localhost[stopped Republish],
- Modify the project's deployment directory to the Tomcat installtion directory,
- Modify the access path of the project, that is, remove the showcase such as the http://localhost/showcase/directory,
- Turn off auto reloading enabled so that it doesn't need to be automatically deployed every time you modify a file.
- Right-click Tocmat v6.0 Server at localhost[stopped republish] and click Clean to complete the deployment of Web project.
- Finally, the deployment of the Tomcat directory was successful,
Seven. Run the project in Apache Tomcat
- Select Debug to debug the project, select Run to run the project,
Eclipse JEE Create Maven project and convert to Dynamic Web project