From 4869059a49e8dd59bec3fbdc6d0ff48bcd7e5501 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Thu, 1 Dec 2016 13:55:56 +0100 Subject: Add unlimited JCE to oraclejdk8 --- packages/oraclejdk/oraclejdk8/build.gradle | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/oraclejdk/oraclejdk8/build.gradle b/packages/oraclejdk/oraclejdk8/build.gradle index b03938b..d9ceafb 100644 --- a/packages/oraclejdk/oraclejdk8/build.gradle +++ b/packages/oraclejdk/oraclejdk8/build.gradle @@ -5,11 +5,31 @@ ext.download = makeDownloadTask( "${project.version.asType(String).replace('.', 'u')}-linux-x64.tar.gz", sha256: '79a3f25e9b466cb9e969d1772ea38550de320c88e9119bf8aa11ce8547c39987') - apply from: '../oracle.gradle' +tasks.untar.doLast { + // delete JCE policies, see unpackJce + project.delete("${buildDir}/unpacked/dist/jre/lib/security/local_policy.jar") + project.delete("${buildDir}/unpacked/dist/jre/lib/security/US_export_policy.jar") +} + +final downloadJce = makeDownloadTask( + url: 'http://enos.itcollege.ee/~jpoial/allalaadimised/jdk8/jce_policy-8.zip', + sha256: 'f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59') + +task unpackJce(type: Copy) { + into file("${buildDir}/unpacked/dist/jre/lib/security") + from zipTree(downloadJce.dest) + eachFile { FileCopyDetails fcd -> + fcd.path = fcd.path.substring(path.indexOf('/') + 1) + } +} +tasks.unpackJce.dependsOn(downloadJce) +tasks.unpackJce.mustRunAfter(tasks.untar) + ospackage { into '/usr/lib/jvm/java-8-oraclejdk' + from unpackJce.outputs.files } activator.env['JAVA_HOME'] = '/usr/lib/jvm/java-8-oraclejdk' -- cgit v1.2.1