I've been trying to get AssetsBundle to load assets from a shaded JAR in Dropwizard 0.7.0 with no success. Here's my code:
In the initialize method of the Application class, I have the following line of code:
bootstrap.addBundle(new AssetsBundle("/assets/favicon.ico", "/favicon.ico"));
The favicon.ico file is located in: src/main/resources/assets/favicon.ico. I have verified that the JAR contains the file in the correct location in the JAR (i.e. from root of JAR: /assets/favicon.ico).
Requesting
http://127.0.0.1:8080/favicon.ico results in a 404 (although it's a bit different in that Jetty returns its 404 error page - unlike if I request something I know does not exist, in which case just a 404 response is returned).
For now I am using the Bazaarvoice ConfiguredAssetsBundle instead, which works like a charm, but I'd love to know if I was not using AssetsBundle correctly, or whether this is indeed a bug.