Original title: How to create Maven project in Eclipse Jee and convert to Dynamic Web project
Note: This document is for the following eclipse versions only, as shown in
for convenience, I put my local compression package in the micro-cloud network disk, you can download directly, jee,subversion,m2eclipse are integrated, download the address
Links: Http://pan.baidu.com/s/1i3pDNd7
I. Creating a Maven project in the Eclipse's menu bar select File->new->other->maven->maven Project Next after you choose Create a simple project (skip Archetype selection), as shown in figure
3. Next after entering group Id,archive id,packaging Click Finish, as shown in figure
4. Create a successful file directory, as shown in figure
Two. Dynamic Web project converted to Java right click on Project name, select Properties Select Project Facets->convert to faceted from ..., as shown
3. Select the dynamic Web module,version 2.5 (3.0 version I have not tested is feasible), select java,version for 1.6, and click further configuration available ... As shown in figure
4. Modify the content directory to/src/main/webapp/, click OK, as shown
5. Finally click Properties for showcase OK to complete the conversion, the final directory structure, as shown in figure
Three. Modify the Java build path right-click on Project name, select Properties Select Java Build Path, remove the JRE 1.5 version, and click the Add Library, as shown
3. Select the JRE System Library and click Next, as shown in
4. Select the Jdk6 version you set, click Finish, as shown
5. Finally click OK to complete the setup, as shown in figure
Four. Modify Java Compile Right click on Project name, select Properties Select Java Compiler, and select Compiler compliance level to 1.6, as shown
Five. Modify deployment Assembly Right click on Project name, select Properties Select Deployment Assembly, and click Add, as shown
3. Select Java Build Path Entries, click Next, as shown in
4. Select Maven Dependencies, click Finish, as shown
5. It is best to click OK to complete the setup, as shown
Six. Set the server Apache Tomcat menu bar to select Window->show view->servers click on the New Server Wizard, as shown in figure
3. Select Tomcat v6.0 Server and click Next, as shown in
4. Select browse, select the correct Apache Tomcat installation directory, then click Next, as shown in
5. Select the project you want to deploy, such as Showcase, then click Add, click Finish, as shown
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
6. Complete the setup project as shown in figure
7. On Servers view, double-click Tomat v6.0 Server at localhost[stopped Republish], as shown in figure
8. Modify the project's deployment directory to the Tomcat Installtion directory, as shown in