maven - 从 GitHub 导入 Maven 原型(prototype)

标签 maven github intellij-idea maven-archetype dropwizard

我想开始一个新的 Drop-Wizard 项目。 DW github (here) 中指定了一个 maven 原型(prototype)。但我不知道如何将其导入我的 Intellij Idea 的 添加 Archtype 选项。具体来说,我必须在 中提供哪个链接存储库 field 。任何帮助,将不胜感激。

最佳答案

由于 dropwizard 原型(prototype)在 maven 中央存储库中不可用,因此您必须:

  • 克隆dropwizard github forked project by niktelford : $ git clone git@github.com:nicktelford/dropwizard.git
  • 查看功能分支 : $ git checkout feature/maven-archetypes
  • 移至 dropwizard-archetypes 模块文件夹: $ cd dropwizard/dropwizard-archetypes
  • 将 dropwizard 原型(prototype)安装到本地存储库: $ mvn install (然后将原型(prototype)样本添加到 $LOCAL_REPO/io/dropwizard/archetypes/下的本地存储库)
  • 使 dropwizard-create 脚本可执行: $ cd target/classes $ chmod +x dropwizard-create
  • 创建您的项目示例: $ ./dropwizard-create com.sample sample

  • 在这里,您生成了项目,然后您可以将其作为 maven 项目导入 Intellij IDEA。

    关于maven - 从 GitHub 导入 Maven 原型(prototype),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21901039/

    相关文章:

    java - Android Studio 无法运行项目 - 错误 :Execution failed for task ':app:preDexDebug' .

    java - 重构 JSP 中的 EL 表达式

    java - JUnit 5 测试未运行/检测到

    java - Tomcat 7 && Java 8 中的严重 : Unable to process Jar entry [module-info. 类]

    maven - 如何在 exec-maven-plugin :exec failure? 上执行清理脚本

    git - Github 是如何处理这么多公钥的

    visual-studio-2010 - 将项目从 Visual Studio 2010 上传到 GitHub

    java - 建议 AspectJ 来自不同 Maven 项目的方法调用

    github 如何修复错误 : refname refs/heads/new_branch not found

    go - http.ServeFile 获取不到静态源,但是命令运行可以获取