dimanche 19 avril 2015

Sbt-native-packager single project with multiple main using multiple config : is it possible and how?


Vote count:

0




I have a client-server project and I have a main for each. I'm trying to use sbt-native-packager to generate start-script for both.


I have a target/P.scala containing :



object Tactic extends Build {

lazy val root =
(project in file(".")).
configs(Client, Server)
.settings( inConfig(Client)(Defaults.configTasks) : _*)
.settings( inConfig(Server)(Defaults.configTasks) : _*)

lazy val Client = config("client") extend Compile

lazy val Server = config("server") extend Compile


}


and my build.sbt contains the following lines :



mainClass in Client := Some("myProject.Client")

mainClass in Server := Some("myProject.Server")

enablePlugins(JavaAppPackaging)


when I run client:stage I have the target/universal/stage/lib directory created with all the necessay jars but no bin directory. What am I doing wrong ??


Subsidiary question what is the key to set the starting script name ?



asked 1 min ago







Sbt-native-packager single project with multiple main using multiple config : is it possible and how?

Aucun commentaire:

Enregistrer un commentaire