typesafehub / sbt-conductr

Typesafe ConductR plugin for sbt
Other
29 stars 22 forks source link

Lagom 1.3 Scala project is not being set up with a bind address #222

Closed huntc closed 7 years ago

huntc commented 7 years ago

When testing a user's Lagom/Scala project, I noticed that the Lagom service wasn't being set up with a bind address i.e.:

    start-command    = ["twitter-producer-impl/bin/twitter-producer-impl", "-J-Xms134217728", "-J-Xmx134217728", "-Dplay.crypto.secret=747769747465722d70726f64756365722d696d706c"]

as compared to the Lagom/Java Chirper project which is on 1.2.2:

    start-command    = ["chirp-impl/bin/chirp-impl", "-J-Xms134217728", "-J-Xmx134217728", "-Dhttp.address=$CHIRPSERVICE_BIND_IP", "-Dhttp.port=$CHIRPSERVICE_BIND_PORT", "-Dplay.crypto.secret=63686972702d696d706c"]

The project that I used was: https://github.com/knoldus/lagom-spike. I added the following to the plugins.sbt:

addSbtPlugin("com.lightbend.conductr" % "sbt-conductr" % "2.3.0")

and then performed a:

twitter-producer-impl/bundle:stage
markusjura commented 7 years ago

This is actually not a problem of ConductR. In this particular case, the lagom-spike project has forgotten to override the describeServices method as:

  override def describeServices: Seq[Descriptor] = List(
    readDescriptor[TwitterProducerService],
    readDescriptor[TwitterSchedulerService]
  )

This step is also documented in the Lagom documentation: http://www.lagomframework.com/documentation/1.3.x/scala/ConductR.html#Using-ConductR-with-your-build

Therefore, I'll close this issue.

Note that I've created another issue against Lagom to discuss if it is necessary to declare two times the services: https://github.com/lagom/lagom/issues/563