【问题标题】:How to use maven archetype in intellij idea, such as spring-mvc-quickstart-archetype?intellij idea中如何使用maven archetype,如spring-mvc-quickstart-archetype?
【发布时间】:2013-11-30 14:13:30
【问题描述】:

我是 maven 的新手。这几天想创建一个spring mvc项目,所以找了spring-mvc-quickstart-archetype,但是在Intellij IDEA中怎么用呢?

【问题讨论】:

    标签: maven intellij-idea maven-archetype


    【解决方案1】:

    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 生成一个项目

    【讨论】:

      【解决方案2】:

      你的意思是如何使用它?使用原型创建现有 maven 项目后,只需将其导入 IDE。

      http://wiki.jetbrains.net/intellij/Creating_and_importing_Maven_projects

      【讨论】:

        【解决方案3】:

        我明白了。只需克隆原型并mvn install 它,我们就可以使用原型了。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2021-12-25
          • 1970-01-01
          • 2015-10-14
          • 1970-01-01
          • 2023-03-11
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多