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
and select Maven, check Crete from archtype, and then select the following third red box, and then click Next
and then enter the following three content, click Next
and then this step to see if the path is correct maven click Next
and then select the directory click finish to finish.
After the project is created automatically open, click the bottom right corner, maven configuration
Then also need some settings, add the source file, right mouse button main folder and select New-Directory
New java and resources folder is a java source file, a resource file
Then select java right, select the following, then the folder will turn blue
and then select the right resources, select the following, then the folder will become
as shown below
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,
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