How to create Maven project in Eclipse and convert to Dynamic Web project
I. Creating a MAVEN project
1. Select File->new->other->maven->maven Project from the Eclipse's menu bar
2. Next 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
How to create Maven project in Eclipse Jee and convert to Dynamic Web project
4. Create a successful file directory, as shown in figure
two. Dynamic Web Project converted to Java
1. Right click on Project's name and select Properties
2. Select Project Facets->convert to faceted from ..., as shown in figure
How to create Maven project in Eclipse Jee and convert to Dynamic Web project
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
1. Right click on Project's name and select Properties
2. 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 the Java Compile
1. Right click on Project's name and select Properties
2. Select Java Compiler and select Compiler compliance level 1.6, as shown in figure
Five. Modify Deployment Assembly
1. Right click on Project's name and select Properties
2. 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. Finally click OK to complete the setup (test can be deleted), as shown in figure
Add:
If it does not appear, it is likely that in Eclipse deployment assembly is disable, then all we need to do is to enable the Deployment assembly option.
there is a. project file in the workspace where the project is located, the file is opened to add the following line for the Enable Deployment Assembly property.
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
is added under <natures>.