Copy Dropwizard configuration file to target directory on build
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:
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.