Skip to content

Commit d71f4da

Browse files
authored
Merge pull request scala#6937 from retronym/topic/jdk10-osgi-test
Bump versions of OSGi testing dependencies for JDK 9 support
2 parents ae43152 + b536780 commit d71f4da

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

build.sbt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,11 @@ lazy val scalacheck = project.in(file("test") / "scalacheck")
613613

614614
lazy val osgiTestFelix = osgiTestProject(
615615
project.in(file(".") / "target" / "osgiTestFelix"),
616-
"org.apache.felix" % "org.apache.felix.framework" % "5.0.1")
616+
"org.apache.felix" % "org.apache.felix.framework" % "5.6.10")
617617

618618
lazy val osgiTestEclipse = osgiTestProject(
619619
project.in(file(".") / "target" / "osgiTestEclipse"),
620-
"org.eclipse.tycho" % "org.eclipse.osgi" % "3.10.100.v20150521-1310")
620+
"org.eclipse.tycho" % "org.eclipse.osgi" % "3.13.0.v20180226-1711")
621621

622622
def osgiTestProject(p: Project, framework: ModuleID) = p
623623
.dependsOn(library, reflect, compiler)
@@ -629,7 +629,7 @@ def osgiTestProject(p: Project, framework: ModuleID) = p
629629
fork in Test := true,
630630
parallelExecution in Test := false,
631631
libraryDependencies ++= {
632-
val paxExamVersion = "4.5.0" // Last version which supports Java 6
632+
val paxExamVersion = "4.11.0" // Last version which supports Java 9+
633633
Seq(
634634
junitDep,
635635
junitInterfaceDep,
@@ -645,6 +645,7 @@ def osgiTestProject(p: Project, framework: ModuleID) = p
645645
)
646646
},
647647
Keys.test in Test := (Keys.test in Test).dependsOn(packageBin in Compile).value,
648+
Keys.testOnly in Test := (Keys.testOnly in Test).dependsOn(packageBin in Compile).evaluated,
648649
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v", "-q"),
649650
unmanagedSourceDirectories in Test := List((baseDirectory in ThisBuild).value / "test" / "osgi" / "src"),
650651
unmanagedResourceDirectories in Compile := (unmanagedSourceDirectories in Test).value,

test/osgi/src/ScalaOsgiHelper.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ trait ScalaOsgiHelper {
2020

2121
def standardOptions: Array[exam.Option] = {
2222
val bundles = (allBundleFiles map makeBundle)
23-
bundles ++ Array[exam.Option](junitBundles())
23+
bundles ++ Array[exam.Option](junitBundles(), bootDelegationPackages(
24+
"sun.*",
25+
"com.sun.*",
26+
"jdk.*"
27+
))
2428
// to change the local repo used (for some operations, but not all -- which is why I didn't bother):
2529
// systemProperty("org.ops4j.pax.url.mvn.localRepository").value(sys.props("maven.repo.local")))
2630
}

0 commit comments

Comments
 (0)