【发布时间】:2013-11-30 14:13:30
【问题描述】:
我是 maven 的新手。这几天想创建一个spring mvc项目,所以找了spring-mvc-quickstart-archetype,但是在Intellij IDEA中怎么用呢?
【问题讨论】:
标签: maven intellij-idea maven-archetype
我是 maven 的新手。这几天想创建一个spring mvc项目,所以找了spring-mvc-quickstart-archetype,但是在Intellij IDEA中怎么用呢?
【问题讨论】:
标签: maven intellij-idea maven-archetype
1) 将插件“Maven Archetype Catalogs”添加到 Intelij
1.1) File -> Settings -> Plugins -> Browse repositories...
1.2) Search for "Maven archetype" and look for the "Maven Archetype Catalogs"
1.3) Click on Install button of that plugin. After finished click the restart intelij button
2) 基于 Spring Boot Simple Archetype 在 Intelij 上新建项目
2.1) File -> New -> Project
2.2) Check the option "Create from archetype" and click the Add Archetype button
2.3) Fill the fields with the archtetype information you want o use
GroupId: org.springframework.boot
ArtifactId: spring-boot-sample-simple-archetype
Version: 1.0.2.RELEASE
Repository: http://central.maven.org/maven2/
2.4) Click OK
这将告诉 intelij 下载新的原型并创建一个新的 maven 项目 根据您选择的这个原型,在这种情况下将使用 Spring Boot CommandLinner 生成一个项目
【讨论】:
你的意思是如何使用它?使用原型创建现有 maven 项目后,只需将其导入 IDE。
http://wiki.jetbrains.net/intellij/Creating_and_importing_Maven_projects
【讨论】:
我明白了。只需克隆原型并mvn install 它,我们就可以使用原型了。
【讨论】: