Open markusjura opened 8 years ago
I would prefer an sbt-play-bundle
plugin so that it can be used for Play apps in isolation of Lagom.
Yes, that's what I've stated above ;-)
Another goodie would be if the sbt-play-bundle
plugin resolves the endpoints from the routes file to generate the SbtBundle.endpoints
key. This way the user by default don't need to worry about this.
sbt-lagom-bundle
kicks in for every project that hasLagomJava
enabled. It does not kick in for projects that haveLagomPlay
,PlayJava
orPlayScala
enabled. As a result the user need to manually specify the following things for aLagomPlay
or Play project:javaOptions in Bundle
conductr-bundle-lib
play.crypto.secret
during prod modeA possible solution would be to create a separate sbt plugin
sbt-play-bundle
that provide some of the above defaults for a Play project. In particular it could provide defaults for the bundle keys, the java options and can add theplay[version]-bundle-lib
. For a Lagom project we also generate and set theplay.crypto.secret
automatically. In the context of Lagom this can be automated because Lagom itself is not using the session at all. In the context of Play the user need to set theplay.crypto.secret
manually for prod mode.sbt-lagom-bundle
could then be based on the newsbt-play-bundle
plugin instead ofsbt-bundle
directly. Also we would need to changesbt-lagom-bundle
to get triggered if the pluginLagomPlay
is enabled. In this case we should usesbt-play-bundle
and override theplay[version]-bundle-lib
to thelagom10-bundle-lib
.