The following content does not contain MAVEN configuration ...
Okay, go to the subject.
Start with a new project, select Maven Project, click Next
Select default and continue to next.
I'm creating a Web project here, so select WebApp and click Next
Fill in the GroupID and Artifactid will automatically fill out the package, fill out and click Finish. About GroupID and Artifactid I looked up from the Internet, we can refer to the following
"GroupID and Artifactid are collectively referred to as" coordinates "in order to ensure the uniqueness of the project, if you want to get your project to the MAVEN local repository, you want to find your project must be based on these two ID to find.
GroupID generally divided into several paragraphs, here I only say two paragraphs, the first paragraph is the domain, the second paragraph is the company name. Domain is also divided into org, COM, CN and so many, including Org is not a profit organization, COM for business organizations. Example of an Apache Tomcat project: The project's GroupID is Org.apache, its domain is org (because Tomcat is a nonprofit project), and the company name is Apache,artigactid Tomcat.
For example, I create a project, I will generally set GroupID to CN.ZR,CN for China, ZR is my personal initials, Artifactid is set to Testproj, the name of your project is testproj, according to this setting, your package structure is preferably cn.zr.testProj, if there is a s Tudentdao, its full path is Cn.zr.testProj.dao.StudentDao. " from https://zhidao.baidu.com/question/1639120287056394340.html
After the creation of a good directory structure as follows
Right-click Project Properties
Select the Def JRE after finish and click OK again.
And then the catalog becomes like this
New Resoures in the test directory, note that it is new- Source Folder, and the project structure is as follows
After the better class output path, general main will output to target/classes, test will output to target/test-classes
Finally, adjust the version of the project
<?xml version= "1.0" encoding= "UTF-8"?>
<web-app version= "3.0"
Xmlns= "Http://java.sun.com/xml/ns/javaee"
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
Xsi:schemalocation= "Http://java.sun.com/xml/ns/javaee
Http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd ">
<display-name>archetype Created Web application</display-name>
</web-app>
Locate the project path setting
Org.eclipse.jdt.core revision changed to
Org.eclipse.wst.common.project.facet.core.xml revision changed to
I created a project that lacks a servlet rack package and then introduces the next rack package
Project started successfully
Eclipse creates a Maven project