The first time you use IDEA to create a maven project, the ideamaven project tutorial

Source: Internet
Author: User

The first time you use IDEA to create a maven project, the ideamaven project tutorial

First use IDEA, create a maven project, first download maven, official address: http://maven.apache.org/download.cgi

Decompress, configure D: \ maven \ apache-maven-3.5.2 \ bin in the path in the environment variable, open cmd, enter mvn-version to check whether the configuration is successful

Open IDEA, new project, select maven Project, and select your jdk as the project SDK,

Select a webapp project and click next. The GroupId is the group name (generally the domain name + company name or name), the ArtifactId is the module name (that is, the project name), and the next, enter the locally decompressed maven path in the maven path and change setting. xml Path. Create a mavenrepository file under maven as a maven repository and open setting. xml, add a <localRepository> (repository address) </localRepository>, IDEA automatically identifies the repository address, click the plus 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 prompt "maven project need to be imported" appears in the lower right corner. Select enable auto-imported and the jar will be automatically downloaded to the local repository in pom. configure xml, Baidu maven repository, search for maven compiler plugin, select the latest version, and click <plugins> <plugin> </plugins>.

<Configuration> <source/> <target/> <encoding/> (JDK version) </configuration>. The configuration of pom. xml is complete.

Right-click the project and open module setting to create the project directory.

The project is complete.

In tomcat Configuration, click Edit deployments, click +, and select Tomcat. If Local Tomcat is used, select Configuration of Application Server in server, find the Local Tomcat Server, and click + in Deployment, select the project to be deployed and select the access path in Application context to run tomcat.

Summary

The above is the tutorial for creating a maven project using IDEA for the first time. I hope it will be helpful to you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.