idea 新建 maven 项目 (避免 idea 在使用 maven 新建 webapp 骨架项目时一直 downloading 的问题)

1. 新建 module,左侧选择 Maven,右侧勾选 Create from archetype,中间找到 maven-archetype-webapp 

 2. 填写 GroupId and ArtifactId

GroupId: the unique identifier of the organization or group that created the project 

ArtifactId: unique base name of the primary artifact being generated by this project

GroupId 类似于项目包名,如 org.apache.maven

ArtifactId 类似于项目名,如 mavendemo

(新建完成后会生成一个 pom.xml 文件,在这个 POM 中,groupId, artifactId, packaging, version 叫作 maven 坐标,它能唯一的确定一个项目,有了 maven 坐标,我们就可以用它来指定我们的项目所依赖的其他项目,插件,或者父项目)

 

3. 选择自己的本地 maven,这样做可以很好的避免 idea 在使用 maven 新建 webapp 骨架项目时一直 downloading 的问题

4. 填写 module 名及其根目录

 此处 module 名 mavendemo,存放位置 C:\workspace.idea\demo\mavendemo

5. 新建完成后 module 结构如下,可以看到前面提到的 pom.xml 以及填写的GroupId 和 ArtifactId

 

posted @ 2017-06-09 23:49  mmmmnnnn  阅读(3142)  评论(0编辑  收藏  举报