How to use Anorm outside of Play?
There is no need of DB
object (part of Play JDBC not Anorm). Anorm works as along as you provide it connection as implicit:
implicit val con: java.sql.Connection = ??? // whatever you want to resolve connection
SQL"SELECT * FROM Table".as(...)
You can resolve JDBC connection in many way: basic DriverManager.getConnection
, JNDI, ...
As for dependency, it's easy to add it in SBT: How to declare dependency on Play's Anorm for a standalone application? .