First, create the project.
It's also easy to create a MAVEN project, choose menu Item--- new--and other, select maven Projectunder Maven in the popup dialog box, and then click Next.
Create a project with Maven in 1.Eclipse
Select Mavenprojec.
2. If you want to select a working set, you can choose Add Project to Working set.
3. Choose Maven-archetype-webapp.
Enter Org.apache.maven.archetypes in the filter and select the artifact ID of Maven-archetype-webapp. Enter groupId,Artifactid,version, Package(we do not consider the Properties for the time being ).
After choosing Maven-archetype-webapp, next.
Before selecting:
When selected:
4. Fill in the appropriate information, packaged is the default to create a package, do not write or can.
GroupID large project name and Artifactid subproject name.
Before filling in:
After filling in:
GroupID:com.souvc.weixin
ArtifactID:com.souvc.test
5. Just start, you need to download some dependent packages.
Observe the Eclipse console discovery:
6. After creating the project, the directory is as follows:
At this point, the project has been created, but the configuration below.
Second, the project configuration.
1. Add Source Folder
MAVEN requires that you create the following source Folder
Src/main/resources
Src/main/java
Src/test/resources
Src/test/java
Add the above source Folder
The effect after adding:
2. Configure the Build Path to set the libraries.
Configure the dependent JDK.
The effect after configuration is complete:
After downloading the dependencies, the effect is as follows:
3. Configure the path.
Modify the output path individually:
Src/main/resources Correspondence Target/classes
Src/main/java Correspondence Target/classes
Src/test/resources Correspondence Target/test-classes
Src/test/java Correspondence Target/test-classes
7. Convert the project to dynamic WEB project
Right-click Properties on the Project
Select Project Facets on the left and click Convert faceted from on the right
Finally, modify WebContent to Webroot.
Add the deployment to Tomcat.
Access:
http://localhost:8080/com.souvc.test/
Note: Before accessing, if the default index.jsp is not added, then add an access to the index.jsp.
Maven Start-Create a graphics tutorial for the first Web project through MAVEN