title: External configuration for Play 2 Framework
body: <p>I have a custom configuration file for my database, and I want to externalize it when my Play project is packaged into a war.</p>
  
  <p>I tried <code>javaOptions</code> in <code>build.sbt</code> with the <code>-DConfig.file</code> java command, but my file is not detected...</p>
  
  <p>my line : <code>javaOptions in run += "-Dconfig.file=conf/database.conf"</code></p>
  
  <p>and my deployed war on a Tomcat server is :</p>
  
  <p><code>/mywar/META-INF/MANIFEST.MF</code></p>
  
  <p><code>/mywar/WEB-INF/lib/myplayproject.jar</code> (with other dependencies)</p>
  
  <p>I put my conf file in lib directory : <code>/lib/conf/database.conf</code></p>
  
  <p>Where am I doing wrong ?</p>
  
  <p>(based on this link : <a href="http://www.scala-sbt.org/0.12.3/docs/Detailed-Topics/Forking.html" rel="nofollow">http://www.scala-sbt.org/0.12.3/docs/Detailed-Topics/Forking.html</a>)</p>