sbt playframework publicar submódulos

Tengo la siguiente estructura de proyecto:

myproject
  |
  +- app
  |
  +- conf
  |
  +- project
  |  |
  |  +- project
  |  |
  |  +- Build.scala (etc.)
  |
  +- modules
     |
     +- security
        |
        +- app
        |
        +- conf

Here is the snippet from my build file:

val security = PlayProject(
    appName + "-security", appVersion, path = file("modules/security")
)

Si trato de hacer un sbt publish with a non snapshot version, sbt exits with following error:

sbt.ResolveException: unresolved dependency: myproject-security#myproject-security_2.9.1;123 

Of course it can't find the dependency in the repository. But how can I publish the submodules together with the main project?

Gracias de antemano.

preguntado el 04 de julio de 12 a las 10:07

2 Respuestas

This question does need more clarification to answer properly. It would be nice to see more of your build file.

If your Play project is taking advantage of SBT sub-projects it should be compiled with the root project. It looks like you are maybe declaring a dependency in your Build.scala for myproject-security. Something like this maybe:

"myproject-security" %% "myproject-security" % "123"

I'm not sure if this is correct, but it is hard to answer this question without seeing the complete build file.

Respondido 30 ago 12, 22:08

sorry. I wasn't online for a longer time. Thanks for your answer. Found it out myself. Does my answer seem correct? - Martin

I found out I needed to aggregate the main project to achieve the desired result. Like so:

...

lazy val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA)
.dependsOn(security)
.aggregate(security)

Respondido el 11 de Septiembre de 12 a las 09:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.