lagomCassandraStart task extension

sbt

(C Bowden) #1

Currently, lagomCassandraStart is appended to sbt projects via global.onLoad. This makes it difficult to extend in the obvious “sbt” way that a typical sbt user would be accustomed to. For example, I can’t simply add a task dependency to lagomCassandraStart to automatically deploy keyspace(s) after cassandra starts. One argument indicates I shouldn’t need this type of behavior if I am using lagom purely, as all my c* state should live within my service keyspace and can properly be crafted on demand via prepare/globalPrepare callbacks. However, sometimes we must build less than pure lagom services which bridge some gaps as we iteratively improve existing monoliths in production. Is it possible to extend lagomCassandraStart without getting in the weeds of overriding global.onLoad and dealing with state manipulation of the build directly?