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.
The metadata about an archetype is stored in the archetype-metadata. xml file located in the directory META-INF/maven of its JAR file, see the reference documentation. The metadata file stores the additional properties, with corresponding default values. It also stores the project's generated files in filesets.
The Archetype Plugin allows the user to create a Maven project from an existing template called an archetype. It also allows the user to create an archetype from an existing project. This plugin requires Java 7.
Since the dropwizard archetypes are not available in maven central repository you have to:
$ git clone [email protected]:nicktelford/dropwizard.git
$ git checkout feature/maven-archetypes
$ cd dropwizard/dropwizard-archetypes
$ mvn install
(The archetype samples are then added to local repository under $LOCAL_REPO/io/dropwizard/archetypes/)$ cd target/classes
$ chmod +x dropwizard-create
$ ./dropwizard-create com.sample sample
Here you have your project generated then you can import it into Intellij IDEA as a maven project.
Currently, to create a Dropwizard project from Maven archetype using IntelliJ IDEA one should select File>New>Project from menu. Then, in the dialog it is necessary to select Maven on the left-hand side, check Create from archetype at the top and press the Add Archetype button.
After that in a dialog that appears
one should enter:
The information about the latest Dropwizard version can be obtained here.
After the aforementioned actions are completed, the desired archetype appears in the list.
Then one should press Next an fill the project's artifact and group ids and press Next. For this particular archetype it is necessary that a property called name should be added which is later used to produce names of application and configuration classes.
After pressing Next and Finish, one can see a newly created project.
Alternatively, one could create a project using a Command Line Interface as described here, and then import the project into IDEA.
Update: Added a youtube video.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With