Here is my situation. I have a playback application that uses the guice module . To work with the guice module:
- I installed it using
play install guice. This sets it in $PLAY_HOME/modules, which is okay for me. I do not want to edit module files in any way. - Then I declared a module in mine
dependencies.ymlas follows:- play -> guice 1.2 - In my application, I launched
play dependencies, and this will completely clear the module and create a file modules/guice-1.2that references the guice module.
The problem lies in the fact that the contents of this file looks like this: /some-absolute-path/play-1.2.x/modules/guice-1.2.
This works great for local development. But when I want to switch to a production server, with a different Play installation! (i.e. with another absolute path to it), it will obviously fail.
So what's the best way to handle this?
Now, I resorted to the ad unit in the file application.confas follows: module.guice=${play.path}/modules/guice-1.2. Unfortunately, magic ${play.path}does not work on these generated files.
By the way, I'm using version 1.2.3 Play!
source
share