Create a MAVEN project with idea step by step

Source: Internet
Author: User
Tags maven central

First of all, we have to go to the official website to download the installation idea, after the installation to enter a copyright service address before it can be used normally, there are other ways to crack.

Open idea Software:


We choose Create New porject, and each button can be clicked to see what it is. For example, we can click Configure in the lower right corner, select Project Defaults, select Settings, then build,execution,deployment--->build Tools---> Maven Settings Maven installation directory, settings.xml file location and local central repository location


Anyway, after we choose Create New project, on the left menu, choose Maven---> Right tick create from archetype---> select


Click Next and then fill in the Groupid,artifactid,version


Click Next and we can check to see if the information we filled in earlier is correct, and we want to add a new properties. The name is Archetypecatalog value of internal, and without this parameter, MAVEN will be very slow to build the project skeleton with archetype. Archetypecatalog represents the plug-in uses the archetype metadata, does not add this parameter when the default is Remote,local, that is, the central warehouse archetype metadata, because the central warehouse archetype too much, so the result is very slow, Specifying internal indicates that only internal metadata is applicable.


Click OK---> click Next to fill in the project name and location Project store path


Click Finish to become the MAVEN project skeleton, after creation, idea should automatically compile the project, go to maven central repository to download the dependency package.

The project directory structure is as follows:


But found that some did not achieve the results we want, then press F4 shortcut key to set up the project

1. Configure the project's JDK and project language level:


2. Configure the module, create a new Java directory under the Src/main directory, and specify as sources.


3. Add Libraries

Some jar packages can be declared in Pom.xml and then automatically downloaded when the project is compiled, such as when we build the project, idea automatically adds JUnit dependencies, and at compile time we have junit.



But we want to add Tomcat dependencies ourselves, in order to satisfy the servlet and JSP dependencies. Tomcat as a servlet container that improves the API for Servlets and JSPs



Select OK and then click Add Selected

4. Set Artifacts

Here you can set the output project name, output path and output file, the individual feel that completely with MAVEN management without setting.

5. Set up Tomcat



It's all set up and it's ready to run.

Create a MAVEN project with idea step by step

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.