Dropwizard recommends using Maven for new services, and supposedly Netbeans 7.4 has great Maven support.

So, I created a new Netbeans project: "New Project..." > "POM Project", and then added the Dropwizard dependency:

<dependencies>
    <dependency>
        <groupId>com.yammer.dropwizard</groupId>
        <artifactId>dropwizard-core</artifactId>
        <version>0.6.2</version>
    </dependency>
</dependencies>

to pom.xml, and then what? Netbeans says the project is broken, because the dependencies don't exist. But that is because Netbeans hasn't downloaded them. But it isn't that supposed to be automatic?

How do you create a new Dropwizard project in Netbeans 7.4?

share|improve this question

Tom

a lot has changed since you asked your question. There is a Maven archetype that is a part of the project, which could be used to create a Dropwizard in Netbeans.

To create a project from Maven archetype in NetBeans one should choose File>New Project (or press Ctrl+Shift+N) and then in Categories select "Maven" and in Projects select "project from Archetype" as shown below.

enter image description here

Then press next. After that in the screen that appears one should key in Dropwizard in the Search input line. The java-simple is a part of Dropwizard.

enter image description here

After pressing Next button one can select project name, version, artefactId, etc.

enter image description here

At the time of writing it was necessary that one should enter the name attribute, which is the contents of Maven name element and this name can be displayed in an IDE. But for this particular archetype name should not contain spaces as the names of the two generated classes are based on this attribute. Otherwise you'll get an error.

Press Finish and you are ready to launch your Dropwizard project in NetBeans. Just don't forget to instruct NetBeans in Properties of your project to pass it a "server" argument as shown below.

enter image description here

Update: Added a youtube video.

share|improve this answer
    
What if there is no "java-simple" entry in the Known Archetype list? Is there any way to configure maven archetypes in NetBeans 8.2 ? – Andrey Lebedenko Mar 6 '17 at 12:20
    
It is possible to create a project using the command line and import it to NetBeans. Take a look here javaeeeee.blogspot.com/2015/01/…. Also, take a look at this project dropwizard-archetype.herokuapp.com. In addition, there is such archetype in 8.2. :) – javaeeeee Mar 12 '17 at 20:00

it's not automatic.

You can either do a build or trigger the "Download dependencies" action from Dependencies node popup and the dependencies will be resolved from your set of repositories.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.