The first time I use IDEA, create a maven project, first download maven, the official address is: http://maven.apache.org/download.cgi
Decompress, configure path in environment variable D:/maven/apache-maven-3.5.2/bin, open cmd, enter mvn -version to check whether the configuration is successful
Open IDEA, new project, select maven project, and select your own jdk in Project SDK.
Select the webapp project and click next. GroupId is the group name (usually the domain name + company name or name), ArtifactId is the module name (that is, the project name), next, maven path, fill in the local unzipped maven path, change the setting.xml path, create a new mavenrepository file under maven as a maven repository, open setting.xml, add a <localRepository> (repository address)</localRepository>, IDEA automatically recognizes the warehouse address, click the + sign under Propertities, Name:archetypeCatalog, Value:internal, click next, enter the project name, and work interval, and click finish. Wait for maven to load the jar package. The maven project need to be imported prompt appears in the lower right corner. Select enable auto-imported. The jar will be automatically downloaded to the local repository. Configure it in pom.xml, search for maven compiler plugin, select the latest version, and in <plugins><plugin> (paste)</plugin></plugins>, and then
<configuration><source/><target/><encoding/> (JDK version)</configuration>, pom.xml configuration is completed
Right-click on the project and open the open module setting to create the project directory
The project is completed.
In Configure tomcat, click Edit Configurations, click +, select Tomcat, if it is local Tomcat, select Local, Application server Configuration in Server, find the local Tomcat server, click + in Deployment, select the project to deploy, select the access path in the Application context, and you can run tomcat.
Summarize
The above is the tutorial for creating a maven project using IDEA for the first time introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support to Wulin.com website!