Intellij IDEA Create Maven Web Project

0. Configure apache-maven-3.1.1 (maven decompression directory)\conf\server.xml

<server></server><mirror></mirror><repository>仓库位置<repository><profile></profile><activeProfiles></<activeProfiles>...

 

1. File --> New Project --> Select the Maven project

 

2. Continue to Next, complete the project establishment

 

3. Right-click the project --> Add Framework Support...--> Check Web Application --> Click the OK button

 

4. Click the [Project Structure] button on the toolbar to enter the project setting interface, and set the project Modules, Libraries, Facets, Artifacts

 

5. Click the [Settings] button on the toolbar to enter the software setting interface, select Maven, and set the Maven home directory [maven installation directory], User settings file [settings.xml directory], Local repository [warehouse location, Jar file download storage location]

 

6. Right-click the project and select MAVEN-->Reimport to import the jar package

 

7. On the Maven Projects interface of the right toolbar, you can right-click to execute Run Maven Bulid under the corresponding command to run

 

Note: To update the jar, you only need to modify the version of the jar package in pom.xml and save it, the idea will automatically update and download the dependency package

 

For other ways, see: http://my.oschina.net/lujianing/blog/266172

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326200027&siteId=291194637