Intellij IDEA Tutorial (five) Maven project

This blog belongs to the original author without permission prohibited reproduced, please respect the original! If you have questions, please contact QQ509961766

A. Create a Maven project

File - New - Project
Here Insert Picture Description
and select Maven, check Crete from archtype, and then select the following third red box, and then click Next
Here Insert Picture Description
and then enter the following three content, click Next
Here Insert Picture Description
and then this step to see if the path is correct maven click Next
Here Insert Picture Description
and then select the directory click finish to finish.
Here Insert Picture Description
After the project is created automatically open, click the bottom right corner, maven configuration
Here Insert Picture Description

Then also need some settings, add the source file, right mouse button main folder and select New-Directory
Here Insert Picture Description

New java and resources folder is a java source file, a resource file
Here Insert Picture Description

Then select java right, select the following, then the folder will turn blue
Here Insert Picture Description
and then select the right resources, select the following, then the folder will become
Here Insert Picture Description
as shown below
Here Insert Picture Description

Two .Maven project to start

Referring Intellij IDEA tutorial (c) installation and configuration of the Tomcat method tomcat disposed added
and then start tomcat, browser type localhost: 8080 / blogServer / index.jsp occur hello world

Two .Maven project life cycle

Click the idea to the right of the toolbar maven, there will be the related operations maven,
Here Insert Picture Description

Take a look at the life cycle inside Which actions: Lifecycle

  • Before you clear all the files used to build the clean generation, mainly file in the target directory
  • validate projects used to verify if it is true, if the necessary information is available
  • compile project compile source code is generally compiled scr / main / java or scr / test / java file inside
  • test with a suitable testing framework to test, test code, compile compiled
  • obtaining good packaging compiled code and compile its package, jar or war
  • vertify This test is used to verify, test result meets a criterion check
  • install install the packages into a local repository, such as other local projects may need to use him
  • deploy packages to remote repository, shared with other developers and projects
Published 75 original articles · won praise 44 · views 510 000 +

Guess you like

Origin blog.csdn.net/u013254183/article/details/105291446