I have a command line app that downloads some reports, processes them, then uploads data to Google Drive. I\'m using Typesafe-Config for all the magic strings I need. Typesa
I also had that issue. I've noticed that you use a Class-Path
declaration in shaded configuration, so I've merged the answer by Lothar with your info and added:
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.my.reports.ReportRunner</Main-Class>
<Class-Path>.</Class-Path>
</manifestEntries>
</transformer>
As I just had the same problem...
The -jar
overrides all classpath settings, so only the jar is seen. -Dconfig.trace=loads
will show what is seen by java.
We want the application.conf on the classpath, as well as the jar, so:
java -cp .:my-reports-1.0-SNAPSHOT.jar full.path.to.main.Main
did the trick for me. application.conf found and overrides reference.conf in the jar.