Why "play run" doesn't read my configuration file?
playframework, playframework-2.1
Solution
Play doesn't seem to listen to the configuration option `config.resource`. A quick Google search led to this blog post, which suggested to use `config.file` instead. The value here would be a file name, relative to your Play application's root directory.
Well, to create a proper answer, I had to research how you could change the main configuration file. What I've found is that Play checks for the `config.file` property, and if it doesn't exist, uses `conf/application.conf`.
Therefore, the way to run it with a custom configuration file is
play "run -Dconfig.file=application.conf"
Your can either provide a file path relative to your Play application's root directory or an absolute path.
Problem
I'm using `"play run"` when I implement something on Play Framework because it supports auto-compile feature. But it seems that `"play run"` doesn't read configuration file that I specify. I'm running Play Framework as follows: ``` $ play "run -Dconfig.resource=application.conf" ``` But configurations written on application.conf are totally ignored. If I do `"play start"` instead, the configuration file works fine. Is there any way to specify configuration file with `"play run"`? I'm using Play Framework 2.1.1 on MacOS 10.8.3.