From c7ec70e0b42d3aaf556df61269cf27eb4bcf4ebc Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Thu, 24 Oct 2013 07:00:59 +0000
Subject: [PATCH] SP-940, SWE-22: Introducing task copyJarsForWebStart and
 folder jarsToBeSignedFolder in order to make the task of signing JAR files
 that it is up-to-date if nothing has changed. Rename marathon*.jar to
 stream-supporting-hhtpinvoker.jar because it is referred in the JNLP
 documents created by servlet classes.

SVN: 30018
---
 openbis_standard_technologies/build.gradle | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/openbis_standard_technologies/build.gradle b/openbis_standard_technologies/build.gradle
index 7b8e16050ee..75e7d834277 100644
--- a/openbis_standard_technologies/build.gradle
+++ b/openbis_standard_technologies/build.gradle
@@ -184,11 +184,12 @@ task checkFilesExist {
   }
 }
 
+jarsToBeSignedFolder = "${buildDir}/jars_to_be_signed"
 signedJarsFolder = "${buildDir}/signed_jars"
 task createOpenbisJar(type: Jar) {
     archiveName = 'openbis.jar'
-    destinationDir = file(signedJarsFolder)
-    outputs.file new File(signedJarsFolder, archiveName)
+    destinationDir = file(jarsToBeSignedFolder)
+    outputs.file new File(jarsToBeSignedFolder, archiveName)
     from zipTree(project(':common').jar.archivePath).plus(
          zipTree(project(':openbis-common').jar.archivePath).plus( 
          zipTree(project(':screening').jar.archivePath).plus( 
@@ -205,12 +206,18 @@ task createOpenbisJar(type: Jar) {
         }
 }
 
-keystoreFile = '../screening/etc/dev.keystore'
-task signWebStartJars(type: Copy) {
-    inputs.file keystoreFile
+task copyJarsForWebStart(type: Copy) {
     from configurations.webStartJars.files
-    into signedJarsFolder
+    into jarsToBeSignedFolder
     rename '(.+)-[^-]*\\.jar', '$1.jar'
+    rename 'marathon-spring-util.*jar', 'stream-supporting-httpinvoker.jar'
+}
+
+keystoreFile = '../screening/etc/dev.keystore'
+task signWebStartJars(type: Copy, dependsOn: [createOpenbisJar, copyJarsForWebStart]) {
+    from jarsToBeSignedFolder
+    into signedJarsFolder
+    inputs.file keystoreFile
     doLast {
         file(signedJarsFolder).listFiles().each { file ->
             ant.signjar(jar: file, keystore: keystoreFile,
@@ -218,7 +225,6 @@ task signWebStartJars(type: Copy) {
         }
     }
 }
-signWebStartJars.dependsOn createOpenbisJar
 
 war.dependsOn compileGwt
 war.dependsOn checkFilesExist
-- 
GitLab