I need to pack my test classes, resources, and also check the dependencies using the sbt build.
This sbt-assembly question : including test classes did not help - test: assembly still did not create a jar with any of the desired classes.
Please note that my setup at the moment looks like this:
FooBuild.scala:
lazy val cucumberAssemblySettings = assemblySettings ++ Seq( mainClass in assembly := Some("cucumber.api.cli.Main"), jarName in assembly := "cucumber.jar", mergeStrategy in assembly := { case "application.conf" => MergeStrategy.concat case "logback.xml" => MergeStrategy.last case x => defaultMergeStrategy(x) } )
And this is about the foo-cucumber subproject:
lazy val foo_cucumber = Project("foo-cucumber", file("foo-cucumber")) .settings(defaultSettings: _*) .settings(cucumberAssemblySettings: _*) .dependsOn( foo_test_server % "compile->compile;test->test", foo_test_utils % "compile->compile;test->test" )
even if I add (Test, assembly) to the settings above, I get only a jar (whose name is not specified, but the full name with the version) that does not contain test classes or dependencies, regardless of invoke sbt foo-cucumber/test:assembly or sbt foo-cucumber/assembly
How to get a jar that has everything (compile and test classes and dependencies)
source share