Skip to content

Commit

Permalink
Adding test for bug #19
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth committed Aug 21, 2013
1 parent 37b0460 commit 464a9f1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import sbt._
import Keys._
import com.typesafe.sbt.SbtNativePackager._

object MutliBuild extends Build {

val appName = "play-bug-1499"
val appVersion = "1.0"

val mySettings: Seq[Setting[_]] =
packageArchetype.java_application ++
Seq(
organization := "org.test",
version := appVersion,
TaskKey[Unit]("show-files") <<= (name, target, streams) map { (n, t, s) =>
System.out.synchronized {
println("Files in ["+n+"]")
val files = (t / "universal/stage").***.get
files foreach println
}
}
)


lazy val common = (
Project(appName + "-common", file("module/common"))
settings(mySettings:_*)
)

lazy val foo = (
Project(appName + "-foo", file("module/foo"))
settings(mySettings:_*)
dependsOn(common)
)

lazy val bar = (
Project(appName + "-bar", file("module/bar"))
settings(mySettings:_*)
dependsOn(common)
)

lazy val aaMain = (
Project(appName + "-main", file("."))
settings(mySettings:_*)
dependsOn(common,foo,bar)
aggregate(foo,bar)
)

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version"))
7 changes: 7 additions & 0 deletions src/sbt-test/universal/mutliproject-java-app-archetype/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Run the staging and check the script.
> stage
> show-files
$ exists target/universal/stage/lib/org.test.play-bug-1499-foo-1.0.jar
$ exists target/universal/stage/lib/org.test.play-bug-1499-common-1.0.jar
$ exists target/universal/stage/lib/org.test.play-bug-1499-bar-1.0.jar
$ exists target/universal/stage/lib/org.test.play-bug-1499-main-1.0.jar

0 comments on commit 464a9f1

Please sign in to comment.