@@ -63,24 +63,20 @@ object Distributor extends BuildExtra {
6363
6464 object dependencies {
6565 object java {
66- private val setOracleCookie : URLConnection => Unit = { _.setRequestProperty(" Cookie" , " oraclelicense=accept-securebackup-cookie" ) }
67- private val trimPathRegex = raw " ^\Qjre1.8.0_191\E(?:\.jre)?/ " .r
66+ private val trimPathRegex = raw " ^\Qjdk-9.0.4\E/ " .r
6867 private val trimPath : String => String = { trimPathRegex.replaceFirstIn(_, " " ) }
6968
70- val win64 = Dependency (" jre.win64" , " 8u191" , " http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jre-8u191-windows-x64.tar.gz" )
71- .withConnectionStep(setOracleCookie)
69+ val win64 = Dependency (" jdk.win64" , " 9.0.4+11" , " https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_windows-x64_bin.tar.gz" )
7270 .extractAsTarGz { trimPath }
73- .to { _ / " distrib-dependencies" / " win64" / " jre " }
71+ .to { _ / " distrib-dependencies" / " win64" / " jdk " }
7472
75- val linuxX64 = Dependency (" jre.linux-x64" , " 8u191" , " http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jre-8u191-linux-x64.tar.gz" )
76- .withConnectionStep(setOracleCookie)
73+ val linuxX64 = Dependency (" jdk.linux-x64" , " 9.0.4+11" , " https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz" )
7774 .extractAsTarGz { trimPath }
78- .to { _ / " distrib-dependencies" / " linux-x64" / " jre " }
75+ .to { _ / " distrib-dependencies" / " linux-x64" / " jdk " }
7976
80- val osx = Dependency (" jre.osx" , " 8u191" , " http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jre-8u191-macosx-x64.tar.gz" )
81- .withConnectionStep(setOracleCookie)
77+ val osx = Dependency (" jdk.osx" , " 9.0.4+11" , " https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_osx-x64_bin.tar.gz" )
8278 .extractAsTarGz { trimPath }
83- .to { _ / " distrib-dependencies" / " osx" / " jre " }
79+ .to { _ / " distrib-dependencies" / " osx" / " jdk " }
8480 }
8581
8682 object nwjs {
@@ -306,14 +302,14 @@ object Distributor extends BuildExtra {
306302 }
307303 }
308304
309- def javaRuntime (platform : String , jreDep : DependencyTask ): FileMappingTask = Def .task {
305+ def javaRuntime (platform : String , jdkDep : DependencyTask ): FileMappingTask = Def .task {
310306 val log = streams.value.log
311307
312308 val root = (rootZipFolder in Distribution ).value
313- val jreDest = s " $root/jre / "
309+ val jreDest = s " $root/jdk / "
314310
315- val jre = jreDep .value
316- val jreFiles : Seq [ZipEntry ] = appResource(platform, root, jre .*** pair rebase(jre , jreDest)) map {
311+ val jdk = jdkDep .value
312+ val jdkFiles : Seq [ZipEntry ] = appResource(platform, root, jdk .*** pair rebase(jdk , jreDest)) map {
317313 // replace \ in paths with /, for easier matching below
318314 case (src, dest) => (src, dest.replace('\\ ' , '/' ))
319315 }
@@ -324,7 +320,7 @@ object Distributor extends BuildExtra {
324320 // For Java 8: <http://www.oracle.com/technetwork/java/javase/jre-8-readme-2095710.html>
325321 platform match {
326322 case " win64" =>
327- val base = s " $root/jre / "
323+ val base = s " $root/jdk / "
328324
329325 val exclusions = Set (
330326 " bin/rmid.exe" , " bin/rmiregistry.exe" , " bin/tnameserv.exe" , " bin/keytool.exe" , " bin/policytool.exe" , " bin/orbd.exe" , " bin/servertool.exe" ,
@@ -346,13 +342,13 @@ object Distributor extends BuildExtra {
346342 " lib/deploy/" , " lib/oblique-fonts/" , " lib/desktop/" , " plugin/"
347343 ).map { exc => s " $base/ $exc" }
348344
349- jreFiles filter {
345+ jdkFiles filter {
350346 case ZipEntry (_, path, _) if (exclusions contains path) || exclusionPatterns.exists(path.startsWith) => log.info(s " Excluding $path" ); false
351347 case _ => true
352348 }
353349
354350 case " osx" =>
355- val base = s " $root/Code Pulse.app/Contents/Resources/app.nw/jre /Contents/Home/ "
351+ val base = s " $root/Code Pulse.app/Contents/Resources/app.nw/jdk /Contents/Home/ "
356352
357353 val exclusions = Set (
358354 " bin/rmid" , " bin/rmiregistry" , " bin/tnameserv" , " bin/keytool" , " bin/policytool" , " bin/orbd" , " bin/servertool" ,
@@ -368,7 +364,7 @@ object Distributor extends BuildExtra {
368364 " lib/oblique-fonts/" , " lib/desktop/" , " plugin/"
369365 ).map { exc => s " $base/ $exc" }
370366
371- jreFiles flatMap {
367+ jdkFiles flatMap {
372368 case ZipEntry (file, path, _) if path == (s " $base/Contents/Home/bin/java " ) =>
373369 Some (ZipEntry (file, path, ExecutableType .Mac .mode)) // executable
374370
@@ -380,7 +376,7 @@ object Distributor extends BuildExtra {
380376 }
381377
382378 case " linux-x64" =>
383- val base = s " $root/jre / "
379+ val base = s " $root/jdk / "
384380
385381 val exclusions = Set (
386382 " bin/rmid" , " bin/rmiregistry" , " bin/tnameserv" , " bin/keytool" , " bin/policytool" , " bin/orbd" , " bin/servertool" ,
@@ -397,7 +393,7 @@ object Distributor extends BuildExtra {
397393 " lib/oblique-fonts/" , " lib/desktop/" , " plugin/"
398394 ).map { exc => s " $base/ $exc" }
399395
400- jreFiles flatMap {
396+ jdkFiles flatMap {
401397 case ZipEntry (file, path, _) if path == (base + " bin/java" ) =>
402398 Some (ZipEntry (file, path, ExecutableType .Unix .mode)) // executable
403399
@@ -430,13 +426,13 @@ object Distributor extends BuildExtra {
430426
431427 import Settings ._
432428
433- def distribution (platform : String , agent : Project , nwjs : DependencyTask , jre : DependencyTask , task : TaskKey [File ])(config : Configuration ) =
429+ def distribution (platform : String , agent : Project , nwjs : DependencyTask , jdk : DependencyTask , task : TaskKey [File ])(config : Configuration ) =
434430 Seq (packageMappings in (config, task) := embeddedWebApp(config, platform).value) ++
435431 inConfig(config) { Seq (
436432 packageMappings in task ++= jettyDist(platform).value,
437433 packageMappings in task ++= embeddedAppFiles(platform).value,
438434 packageMappings in task ++= nwjsRuntime(platform, nwjs).value,
439- packageMappings in task ++= javaRuntime(platform, jre ).value,
435+ packageMappings in task ++= javaRuntime(platform, jdk ).value,
440436 packageMappings in task ++= agentJar(agent, platform).value,
441437 task := {
442438 val log = streams.value.log
0 commit comments