How to pass in defines to atmos:run

50 views
Skip to first unread message

Kevin Hester

unread,
Nov 27, 2013, 4:23:00 PM11/27/13
to typesafe...@googlegroups.com
Hi ya'll,

We're just getting started with using the Typesafe Console on our relatively mature Play/scala/akka based app.  One question I have about the sbt plugin: How can I pass in parameters to the started play process.  For instance without atmos I would have used:

run -Dconfig.file=/var/lib/foo/foo.conf

To pass in a non standard config file. But if I try this with atmos:run it doesn't seem to support -D flags, do you know if there is an alternative?

[backend] $ atmos:run -Dconfig.file=/var/lib/foo/foo.conf 
[info] Starting Atmos and Typesafe Console ...
[info] Typesafe Console is available at http://localhost:9900
[info] Running play.core.server.NettyServer -Dconfig.file=/var/lib/xeralux/backend.conf
Bad application path: -Dconfig.file=/var/lib/foo/foo.conf

Any pointers would be appreciated.  Do I need to add this behavior to the plugin myself?

Kevin

Peter Vlugter

unread,
Nov 27, 2013, 4:55:01 PM11/27/13
to Kevin Hester, Typesafe Console User
Hi Kevin,

You don't seem to using the sbt-atmos-play plugin, which adds an atmos:run version of play development run. The atmos:run in sbt-atmos-play is the same task configured for tracing.

https://github.com/sbt/sbt-atmos#play-projects

Note that setting config.file will not work at this time (but setting other properties should be fine). The reason is that sbt-atmos-play also sets config.resource to make it possible to add extra configuration for tracing. So for atmos:run you'll need your development configuration to be in the conf dir, or on the classpath, and use config.resource for switching.

Cheers,
Peter
> --
> You received this message because you are subscribed to the Google Groups "Typesafe Console User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to typesafe-conso...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages