What is the activator command to generate application secret?
Asked Answered
U

2

6

I'm using Play Framework 2.3.6. Since Play 2.3.x play commands are replaced with activator commands. Play's documentation for 2.3.x as well as latest 2.4.x mentions commands play-generate-secret and play-update-secret but I am not able to find corresponding activator commands.

We may not choose to use these secrets for production environment but would like play to generate secrets for integration and pre-prod environments - which we can change frequently.

Has anyone done this before? What are the proper activator commands?

Undersea answered 27/11, 2014 at 12:56 Comment(0)
C
7

Both

activator play-generate-secret

and

activator play-update-secret

work well for the Activator.

You can find their definition here in the sources. And as you can see they are part of Play and not the Activator.

val generateSecret = TaskKey[String]("play-generate-secret", "Generate a new application secret", KeyRanks.BTask)
val updateSecret = TaskKey[File]("play-update-secret", "Update the application conf to generate an application secret", KeyRanks.BTask)
Cementum answered 27/11, 2014 at 13:35 Comment(2)
Brilliant! That works perfect. I tried 'activator help' but couldn't find it in the listing. Also tried executing 'play-generate-secret' directly(without activator) but didn't think of 'activator play-generate-secret'(bit of a shame!) ThanksUndersea
in 2.4.x it seems it is playGenerateSecretNasho
S
3

As the comment from @john mentions, this is

activator playGenerateSecret

from Play 2.4 onwards.

Servomechanism answered 1/2, 2017 at 15:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.