Build maven with the new version of IntelliJ IDEA, and create a web project with Maven (Graphic tutorial), intellijmaven
I have never tried maven to manage projects before, but it is inconvenient to manually find the package export package. So today I started a maven test with IDEA of version 2016.
Open IDEA and create a new project:
Select Maven and jdk on your computer:
Next we will customize the GroupId and ArtifactId. Here it is just a demo, so we just name it
Then customize the project name, Finish:
Maven created
In maven, the main/java and main/resources directories are generated under src during the first creation. The test directory in src must be created by yourself, and the code in the test directory will not be released, used for testing.
Create a web project in maven:
Right-click Add Framework Support and the Project Creation option is displayed:
Select a web project and click OK.
Then configure the web Project dependency package under pom. xml:
The idea prompts Maven projects need to be imported. Click Import ChangesEnable Auto-Import to enable maven to automatically download the Import package.
View the External Libraries under the project and you can find that the dependency package has been downloaded:
Next, create a servlet in the src/main/java directory.
Finally, configure the tomcat server:
Finally, publish and run the program, and then enter the servlet request in the browser:
Click OK
The servlet successfully processes the request response. At this point, the maven project is successfully created.
Summary
The above is a new version of IntelliJ IDEA that I will introduce to you to build maven and use Maven to create a web project. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!