The Dropwizard convention is to build your whole application as one “fat” JAR file and to provide it a YAML configuration file on startup like so:

java -jar yourapplication-1.0.0-SNAPSHOT.jar server configuration.yml

When we run the package phase using Maven, our .yml file is not automatically copied to the target directory nor is it bundled with the JAR (and rightly so).

To have Maven copy your YAML configuration, simply add the following to your pom.xml. I am assuming your configuration.yml file is in src/main, if not then just modify the value inside the “directory” tags.