Open ekis opened 8 years ago
I'll look into creating an executable with a multi-module build.
Excellent, thank you.
In the interest of completeness and precision, this is very close to build I have currently defined - it fails for all modules except the bootstrapCli
one.
lazy val root: Project = (project in file("."))
.aggregate(common, commonTest, core, bootstrapCli)
lazy val common: Project = (project in file("common"))
.settings(
libraryDependencies := ...
)
lazy val commonTest: Project = (project in file("commonTest"))
.dependsOn(common % "compile -> test")
.settings(
libraryDependencies := ...
)
lazy val core: Project = (project in file ("core"))
.dependsOn(common, commonTest % "test -> test")
.settings(
libraryDependencies := ...,
javacOptions in (Compile, compile) ++= Seq("-parameters"),
javacOptions in doc ++= Seq.empty,
)
lazy val bootstrapCli: Project = (project in file("bootstrapCli"))
.dependsOn(core % "compile -> compile;test -> test")
.settings(
mainClass in Compile := Some("com._3esi.load.bootstrap.cli.Bootstrap")
)
you will have the same problem when from the project root directory type: sbt run
the right solution should be add at your sbt file this line: onLoad in Global ~= ( andThen ("bootstrapCli" :: ))
According to existing
sbt-launch4j
documentation, there is no way to configure underlyinglaunch4j
so it is unclear what defaults are being used and how - except relying on defaults fromLaunch4jPlugin.scala
.Since documentation doesn't mention it, it is not clear to me how multi-module builds should be set up or is it even possible - currently, it seems to me
sbt-launch4j
expects each module to have its own main class, since after executingsbt build-launcher
I am seeing errorNo main classes were found
on all modules, except the one bootstrap module which legitimately hasmainClass
defined.How can I setup a multi-module build with this plugin? How can I configure the underlying
launch4j
and where do I need to place the XML file in?