dimanche 6 juillet 2014

Can a sbt multi project build use the subprojects's dependency conf to build them in order?


Vote count:

0




I have the following directory structure for scala projects:



~/development/projects/projectA
~/development/projects/projectB
~/development/projects/projectC
...


I wrote an sbt build definition to build all the projects from a root project:



~/development/projects/build.sbt


The file is written with entries for each project:



lazy val projectA = project

lazy val projectB = project.dependsOn(projectB)
...


Every time I add a project or change the dependencies beetween the projects I have to update this file. I don't think it is necessary to do that manually. Each project contains a build.sbt file, too, in which the project's dependencies is configured.


So sbt already knows about all the dependencies and the root project should be able to find all the projects easily, because these are located in subdirectories containing a build.sbt file.


Is there an existing mechanism or plugin that automatically takes all the projects, analyses their dependencies and build them all in order?


It would be perfect if it can handle recursive subproject directory structures like this:



~/development/projects/domainA/projectA
~/development/projects/domainA/projectA
~/development/projects/domainB/projectC
~/development/projects/domainB/projectD
....


If there is not such a mechanism or plugin:



  • Maybe I missunderstood something. How do other people work build multiple interdependend projects?

  • Should I write a task or plugin myself to do sbt what I want? Any hints on this?



asked 29 secs ago






Aucun commentaire:

Enregistrer un commentaire