title: Executable Jar cannot find typesafe/config application.conf on classpath
body: <p>I have a command line app that downloads some reports, processes them, then uploads data to Google Drive. I'm using <a href="https://github.com/typesafehub/config/blob/master/README.md#api-example" rel="nofollow">Typesafe-Config</a> for all the magic strings I need. Typesafe-Config looks on the classpath for my application.conf file and uses HOCON to map config objects to fields in my class, like this:</p>
  
  <p>From <code>~/configs/application.conf</code>:</p>
  
  <p><code>my.homePageUrl = "https://my.home.com"</code></p>
  
  <p>From <code>MyClass.java</code>:</p>
  
  <pre><code>private static Config config = ConfigFactory.load();
  private static final String HOME_URL = config.getString("my.homePageUrl");
  </code></pre>
  
  <p>I'm using the <code>maven-shade-plugin</code> to build an executable .jar for easy deployment on a remote server. The plugin looks like this:</p>
  
  <pre><code>&lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;transformers&gt;
                          &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                              &lt;manifestEntries&gt;
                                  &lt;Main-Class&gt;com.my.reports.ReportRunner&lt;/Main-Class&gt;
                                  &lt;Class-Path&gt;~/configs/application.conf&lt;/Class-Path&gt;
                              &lt;/manifestEntries&gt;
                          &lt;/transformer&gt;
                      &lt;/transformers&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>The problem is, when I run the executable .jar, <code>application.conf</code> isn't found on my classpath (I guess this also could be a bug in the typesafe code). All this works just fine in Intellij. </p>
  
  <pre><code>dustinevan@iMac:~/bin$ java -jar my-reports-1.0-SNAPSHOT.jar 
  Exception in thread "main" java.lang.ExceptionInInitializerError
  Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'my'
      at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:124)
      at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:147)
      at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:159)
      at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:164)
      at com.typesafe.config.impl.SimpleConfig.getList(SimpleConfig.java:212)
      at com.typesafe.config.impl.SimpleConfig.getHomogeneousUnwrappedList(SimpleConfig.java:271)
      at com.typesafe.config.impl.SimpleConfig.getStringList(SimpleConfig.java:329)
      at com.stellarliving.reports.ecp.ReportRunner.&lt;clinit&gt;(ReportRunner.java:19)
  
  dustinevan@iMac:~/configs$ ls
  total 8
  -rw-r--r--@  1 dustinevan  staff  1520 Jun 13 01:16 application.conf
  </code></pre>
  
  <p>I've tried MANY permutations, and done lots of reading to solve this, any help would be greatly appreciated. </p>