Search code examples
mavengithubintellij-ideamaven-archetypedropwizard

import maven archetypes from GitHub


I want to start a new Drop-Wizard project. There is a maven archetype specified in the DW github (here) . But i don't know how to import it into my Intellij Idea's add Archtype option. Being specific, which link i have to provide in the Repository field. Any help would be appreciated.


Solution

  • Since the dropwizard archetypes are not available in maven central repository you have to:

    • Clone the dropwizard github forked project by niktelford:
      $ git clone [email protected]:nicktelford/dropwizard.git
    • Checkout the feature branch:
      $ git checkout feature/maven-archetypes
    • Move to dropwizard-archetypes module folder:
      $ cd dropwizard/dropwizard-archetypes
    • Install the dropwizard archetypes to your local repository:
      $ mvn install (The archetype samples are then added to local repository under $LOCAL_REPO/io/dropwizard/archetypes/)
    • Make the dropwizard-create script executable:
      $ cd target/classes
      $ chmod +x dropwizard-create
    • Create your project sample:
      $ ./dropwizard-create com.sample sample

    Here you have your project generated then you can import it into Intellij IDEA as a maven project.