idea采用maven构建quickStart项目

一、Create from archetype

1)File->Project

idea采用maven构建quickStart项目

2)设置项目的GroupId、ArtifactId、Version,然后一直Next,Finished。

idea采用maven构建quickStart项目

3)新建的项目的目录结构为

idea采用maven构建quickStart项目

二、运行项目

1).Run->Edit Configurations

idea采用maven构建quickStart项目

2).需要点击Import Changes 或者Enable Auto-Import中一个。


idea采用maven构建quickStart项目

点击后项目的目录结构会有一些变化,可以和一中的步骤3)的新建目录对比一下。

idea采用maven构建quickStart项目

3)配置Main class

idea采用maven构建quickStart项目

4)运行成功
idea采用maven构建quickStart项目