From a02f8d3015821dfda82a9dde6a1c1eaa3b8c1cdb Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Thu, 31 Oct 2013 15:27:42 +0000 Subject: [PATCH] SP-970, SWE-22: refactoring dss client creation. having only one dss client zip. SVN: 30091 --- openbis_standard_technologies/build.gradle | 109 +------------ openbis_standard_technologies/clients.gradle | 153 ++++++++++++++++++ .../dss-client.gradle | 67 -------- .../dss-upload-gui.gradle | 76 --------- .../gradle/wrapper/gradle-wrapper.properties | 4 +- 5 files changed, 160 insertions(+), 249 deletions(-) create mode 100644 openbis_standard_technologies/clients.gradle delete mode 100644 openbis_standard_technologies/dss-client.gradle delete mode 100644 openbis_standard_technologies/dss-upload-gui.gradle diff --git a/openbis_standard_technologies/build.gradle b/openbis_standard_technologies/build.gradle index 12246831804..53b5f79c039 100644 --- a/openbis_standard_technologies/build.gradle +++ b/openbis_standard_technologies/build.gradle @@ -14,8 +14,7 @@ apply from: 'http://svncisd.ethz.ch/repos/cisd/gradle/trunk/javaproject.gradle' apply from: 'query-api.gradle' apply from: 'screening-api.gradle' apply from: 'proteomics-api.gradle' -apply from: 'dss-client.gradle' -apply from: 'dss-upload-gui.gradle' +apply from: 'clients.gradle' apply from: 'admin-console.gradle' apply plugin: 'war' @@ -25,7 +24,6 @@ archivesBaseName = 'openBIS-server-standard-technologies' configurations.create('gwt') configurations.create('zipping') configurations.create('datastore_server') -configurations.create('webStartJars') def jettyVersion = '8.1.8' @@ -55,31 +53,6 @@ dependencies { 'slf4j:slf4j:+', 'slf4j:slf4j-log4j12:+', 'sybit:image-viewer:+' - - webStartJars 'cisd:cisd-base:+', - 'apache:commons-codec:+', - 'apache:commons-io:+', - 'apache:commons-httpclient:+', - 'apache:commons-lang:+', - 'apache:commons-logging:+', - 'apache:log4j:+', - 'apache:geronimo-stax:+', - 'apache:poi:+', - 'apache:poi-ooxml:+', - 'apache:poi-ooxml-schemas:+', - 'apache:xmlbeans:+', - 'dom4j:dom4j:+', - 'imagej:ij:+', - 'python:jython:+', - 'sybit:image-viewer:+', - 'springframework:spring:+', - 'springframework:spring-aop:+', - 'springframework:spring-beans:+', - 'springframework:spring-context:+', - 'springframework:spring-core:+', - 'springframework:spring-web:+', - 'marathon:marathon-spring-util:+', - 'aopalliance:aopalliance:+' } buildscript { @@ -188,60 +161,6 @@ task checkFilesExist { } } -jarsToBeSignedFolder = "${buildDir}/jars_to_be_signed" -signedJarsFolder = "${buildDir}/signed_jars" -task createOpenbisJar(type: Jar) { - archiveName = 'openbis.jar' - 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(':openbis_api').jar.archivePath).plus( - zipTree(project(':datastore_server').jar.archivePath).plus( - zipTree(project(':screening').jar.archivePath).plus( - zipTree(project(':openbis').jar.archivePath)))))).matching { - include '**/ch/systemsx/cisd/common/**/*.class' - include '**/ch/systemsx/cisd/openbis/common/**/*.class' - include '**/ch/systemsx/cisd/openbis/generic/client/api/**/*.class' - include '**/ch/systemsx/cisd/openbis/generic/client/cli/**/*.class' - include '**/ch/systemsx/cisd/openbis/generic/shared/api/**/*.class' - include '**/ch/systemsx/cisd/openbis/plugin/screening/client/api/**/*.class' - include '**/ch/systemsx/cisd/openbis/plugin/screening/shared/api/**/*.class' - include '**/ch/systemsx/cisd/openbis/dss/client/api/**/*.class' - include '**/ch/systemsx/cisd/openbis/dss/generic/shared/api/**/*.class' - include '**/ch/systemsx/cisd/openbis/dss/screening/shared/api/**/*.class' - include '**/shared/I*.class' - include '**/shared/basic/dto/**/*.class' - include '**/shared/basic/*.class' - include '**/*BuildAndEnvironmentInfo.class' - } -} - -task copyJarsForWebStart(type: Copy) { - from configurations.webStartJars.files - into jarsToBeSignedFolder - rename '(.+)-[^-]*\\.jar', '$1.jar' - rename 'dom4j.jar', 'dom4j-1.6.1.jar' - rename 'poi-[^-]*\\.jar', 'poi.jar' - rename 'poi-ooxml-[^-]*\\.jar', 'poi-ooxml.jar' - rename 'poi-ooxml-schemas-[^-]*\\.jar', 'poi-ooxml-schemas.jar' - rename 'geronimo-stax.jar', 'geronimo-stax-api_1.0_spec-1.0.jar' - rename 'xmlbeans.jar', 'xmlbeans-2.3.0.jar' - rename 'marathon-spring-util.*jar', 'stream-supporting-httpinvoker.jar' -} - -keystoreFile = '../screening/etc/dev.keystore' -task signWebStartJars(type: Copy, dependsOn: [createOpenbisJar, dssGui, copyJarsForWebStart]) { - from jarsToBeSignedFolder - into signedJarsFolder - inputs.file keystoreFile - doLast { - file(signedJarsFolder).listFiles().each { file -> - ant.signjar(jar: file, keystore: keystoreFile, - alias: 'openbis', storepass: 'openbistest') - } - } -} war.dependsOn compileGwt war.dependsOn checkFilesExist @@ -388,8 +307,10 @@ task zipDss(type: Zip, dependsOn: signWebStartJars) { rename 'common-.*jar', 'common.jar' } - from (files(dssUploadGuiJars.collect({"${signedJarsFolder}/${it}"}))) { + from (signedJarsFolder) { into 'datastore_server/lib/dss_upload_gui' + exclude openbisClientJarName + exclude dssCliClientJarName } from (project(':datastore_server').fileTree(dir: 'dist', includes: ['**/*'], excludes:['dss_client.sh', 'etc/**'])) { @@ -416,10 +337,6 @@ task zipDss(type: Zip, dependsOn: signWebStartJars) { into 'datastore_server/server/etc' } - from(dssGuiZip.archivePath) { - into 'datastore_server/lib/' - } - from (project(':rtd_phosphonetx').fileTree(dir: 'source/core-plugins', includes:['proteomics/**', 'proteomics-optional/**'], excludes:['**/as/**', '**/package-to-dist']).plus( project(':screening').fileTree(dir: 'source/core-plugins', includes:['screening/**', 'screening-optional/**'], excludes:['**/as/**', '**/package-to-dist']).plus( project(':deep_sequencing_unit').fileTree(dir: 'source/core-plugins', includes:['illumina-ngs/**'], excludes:['**/as/**', '**/package-to-dist'])))) { @@ -427,31 +344,15 @@ task zipDss(type: Zip, dependsOn: signWebStartJars) { } } -task clientsAndApis(type: Zip) { +task clientsAndApis(type: Zip, dependsOn: [dssClientZip, queryApiZip, proteomicsApiZip, screeningApiZip]) { baseName 'openBIS-clients-and-APIs' from dssClientZip.archivePath - from dssGuiZip.archivePath from queryApiZip.archivePath from proteomicsApiZip.archivePath from screeningApiZip.archivePath - - - from (dssClientZip.archivePath) { - rename { String fileName -> fileName.replace('client', 'client-screening')} - } - - from (dssGuiZip.archivePath) { - rename { String fileName -> fileName.replace('gui', 'gui-screening')} - } - from ('../openbis_all/dist/readme.txt') } -clientsAndApis.dependsOn dssClientZip -clientsAndApis.dependsOn dssGuiZip -clientsAndApis.dependsOn queryApiZip -clientsAndApis.dependsOn proteomicsApiZip -clientsAndApis.dependsOn screeningApiZip build.dependsOn zip build.dependsOn zipDss diff --git a/openbis_standard_technologies/clients.gradle b/openbis_standard_technologies/clients.gradle new file mode 100644 index 00000000000..0e43e41eebc --- /dev/null +++ b/openbis_standard_technologies/clients.gradle @@ -0,0 +1,153 @@ +configurations.create('webStartJars') +dependencies { + webStartJars 'cisd:cisd-base:+', + 'cisd:cisd-args4j:+', + 'cglib:cglib-nodep:+', + 'jline:jline:+', + 'apache:commons-codec:+', + 'apache:commons-io:+', + 'apache:commons-httpclient:+', + 'apache:commons-lang:+', + 'apache:commons-logging:+', + 'apache:log4j:+', + 'apache:geronimo-stax:+', + 'apache:poi:+', + 'apache:poi-ooxml:+', + 'apache:poi-ooxml-schemas:+', + 'apache:xmlbeans:+', + 'dom4j:dom4j:+', + 'imagej:ij:+', + 'python:jython:+', + 'sybit:image-viewer:+', + 'springframework:spring:+', + 'springframework:spring-aop:+', + 'springframework:spring-beans:+', + 'springframework:spring-context:+', + 'springframework:spring-core:+', + 'springframework:spring-web:+', + 'marathon:marathon-spring-util:+', + 'aopalliance:aopalliance:+' +} + +jarsToBeSignedFolder = "${buildDir}/jars_to_be_signed" +signedJarsFolder = "${buildDir}/signed_jars" +openbisClientJarName = 'openbis.jar' +dssCliClientJarName = 'dss_client.jar' +dssGuiClientJarName = 'dss_upload_gui.jar' + +task createOpenbisJar(type: Jar) { + archiveName = openbisClientJarName + 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(':openbis_api').jar.archivePath).plus( + zipTree(project(':datastore_server').jar.archivePath).plus( + zipTree(project(':screening').jar.archivePath).plus( + zipTree(project(':openbis').jar.archivePath)))))).matching { + include '**/ch/systemsx/cisd/common/**/*.class' + include '**/ch/systemsx/cisd/openbis/common/**/*.class' + include '**/ch/systemsx/cisd/openbis/generic/client/api/**/*.class' + include '**/ch/systemsx/cisd/openbis/generic/client/cli/**/*.class' + include '**/ch/systemsx/cisd/openbis/generic/shared/api/**/*.class' + include '**/ch/systemsx/cisd/openbis/plugin/screening/client/api/**/*.class' + include '**/ch/systemsx/cisd/openbis/plugin/screening/shared/api/**/*.class' + include '**/ch/systemsx/cisd/openbis/dss/client/api/**/*.class' + include '**/ch/systemsx/cisd/openbis/dss/generic/shared/api/**/*.class' + include '**/ch/systemsx/cisd/openbis/dss/screening/shared/api/**/*.class' + include '**/shared/I*.class' + include '**/shared/basic/dto/**/*.class' + include '**/shared/basic/*.class' + include '**/*BuildAndEnvironmentInfo.class' + } +} + +dssClientJars = ['cisd-base.jar', 'cisd-args4j.jar', 'cglib-nodep.jar ', 'jline.jar', 'spring.jar', + 'stream-supporting-httpinvoker.jar', 'poi.jar', 'poi-ooxml.jar', 'poi-ooxml-schemas.jar', + 'commons-codec.jar', 'commons-httpclient.jar', 'commons-io.jar', 'commons-lang.jar', + 'commons-logging.jar', 'jython.jar', 'log4j.jar', 'dom4j-1.6.1.jar', + 'geronimo-stax-api_1.0_spec-1.0.jar', 'xmlbeans-2.3.0.jar'] + +task createDssClientJar(type: Jar) { + archiveName = dssGuiClientJarName + destinationDir = file(jarsToBeSignedFolder) + outputs.file new File(jarsToBeSignedFolder, archiveName) + + from (project(':common').compileJava.outputs.getFiles().getAsFileTree().plus( + project(':openbis-common').compileJava.outputs.getFiles().getAsFileTree().plus( + project(':openbis_api').compileJava.outputs.getFiles().getAsFileTree().plus( + project(':openbis').compileJava.outputs.getFiles().getAsFileTree().plus( + project(':datastore_server').compileJava.outputs.getFiles().getAsFileTree())))).matching { + include 'ch/systemsx/cisd/common/**/*.class' + include 'ch/systemsx/cisd/openbis/common/**/*.class' + include 'ch/systemsx/cisd/openbis/generic/shared/**/*.class' + include 'ch/systemsx/cisd/openbis/plugin/query/shared/**/*.class' + include 'ch/systemsx/cisd/openbis/dss/client/**/*.class' + include 'ch/systemsx/cisd/openbis/dss/generic/shared/api/**/*.class' + include 'ch/systemsx/cisd/openbis/dss/generic/shared/utils/**/*.class' + include 'org/python/core/SyspathArchiveHack.class' + include 'ch/systemsx/cisd/openbis/dss/BuildAndEnvironmentInfo.class' + }) + + from (project(':datastore_server').fileTree(dir: 'resource', includes: ['ok.png', 'wrong.png', 'wait.gif'])) + + manifest { + def manifestClasspath = dssClientJars.collect { it }.join(' ') + attributes("Main-Class": "ch.systemsx.cisd.openbis.dss.client.api.gui.DataSetUploadClient", + "Version": versionNumber, + "Build-Number": "${versionNumber} (r${revisionNumber},${cleanFlag})", + "Class-Path": manifestClasspath) + } +} + +task copyJarsForWebStart(type: Copy) { + from configurations.webStartJars.files + from (jarsToBeSignedFolder) { + include dssGuiClientJarName + rename { String fileName -> fileName.replace(dssGuiClientJarName, dssCliClientJarName)} + } + into jarsToBeSignedFolder + rename 'poi-.*\\.jar', 'poi.jar' + rename 'poi-ooxml-.*\\.jar', 'poi-ooxml.jar' + rename 'poi-ooxml-schemas-.*\\.jar', 'poi-ooxml-schemas.jar' + rename '(.+)-[^-]*\\.jar', '$1.jar' + rename 'dom4j.jar', 'dom4j-1.6.1.jar' + rename 'geronimo-stax.jar', 'geronimo-stax-api_1.0_spec-1.0.jar' + rename 'xmlbeans.jar', 'xmlbeans-2.3.0.jar' + rename 'marathon-spring-util.*jar', 'stream-supporting-httpinvoker.jar' +} + +keystoreFile = '../screening/etc/dev.keystore' +task signWebStartJars(type: Copy, dependsOn: [createOpenbisJar, createDssClientJar, copyJarsForWebStart]) { + from jarsToBeSignedFolder + into signedJarsFolder + inputs.file keystoreFile + doLast { + file(signedJarsFolder).listFiles().each { file -> + if (file.name == dssCliClientJarName) { + ant.jar(destfile: file, update: true) { + delegate.manifest { + attribute(name: 'Main-Class', value: 'ch.systemsx.cisd.openbis.dss.client.api.cli.DssClient') + } + } + } + ant.signjar(jar: file, keystore: keystoreFile, + alias: 'openbis', storepass: 'openbistest') + } + } +} + +task dssClientZip(type: Zip, dependsOn: signWebStartJars) { + baseName 'dss_client' + + from (signedJarsFolder) { + into 'dss_client/lib' + exclude openbisClientJarName + } + + from(project(':datastore_server').file('dist/dss_client.sh')) { + into 'dss_client' + fileMode 0755 + } +} + diff --git a/openbis_standard_technologies/dss-client.gradle b/openbis_standard_technologies/dss-client.gradle deleted file mode 100644 index 3a3e4e7a3d4..00000000000 --- a/openbis_standard_technologies/dss-client.gradle +++ /dev/null @@ -1,67 +0,0 @@ -configurations.create('dssClientLibs') -configurations.create('dssClientPartialLibs') - -dependencies { - - dssClientLibs 'cglib:cglib-nodep:+', - 'cisd:cisd-args4j:+', - 'cisd:cisd-base:+', - 'apache:poi-ooxml:+', - 'springframework:spring:+', - 'apache:commons-logging:+', - 'python:jython:+', - 'apache:commons-httpclient:+', - 'marathon:marathon-spring-util:+', - 'apache:log4j:+', - 'dom4j:dom4j:+' - - dssClientPartialLibs 'google:gwt-user:2.4' -} - -task dssClient(type: Jar) { - baseName 'dss_client' - - from (project(':common').compileJava.outputs.getFiles().getAsFileTree().plus( - project(':openbis-common').compileJava.outputs.getFiles().getAsFileTree().plus( - project(':openbis_api').compileJava.outputs.getFiles().getAsFileTree().plus( - project(':openbis').compileJava.outputs.getFiles().getAsFileTree().plus( - project(':datastore_server').compileJava.outputs.getFiles().getAsFileTree())))).matching { - include 'ch/systemsx/cisd/common/**/*.class' - include 'ch/systemsx/cisd/openbis/common/**/*.class' - include 'ch/systemsx/cisd/openbis/generic/shared/**/*.class' - include 'ch/systemsx/cisd/openbis/plugin/query/shared/**/*.class' - include 'ch/systemsx/cisd/openbis/dss/client/**/*.class' - include 'ch/systemsx/cisd/openbis/dss/generic/shared/api/**/*.class' - include 'ch/systemsx/cisd/openbis/dss/generic/shared/utils/**/*.class' - include 'ch/systemsx/cisd/openbis/dss/BuildAndEnvironmentInfo.class' - }) - - from zipTree(configurations.dssClientPartialLibs.files.iterator().next()).matching { - include '**/com/google/gwt/user/client/rpc/IsSerializable.class' - include '**/com/google/gwt/user/client/rpc/SerializableException.class' - } - - manifest { - def manifestClasspath = configurations.dssClientLibs.collect { it.getName() }.join(',') - attributes("Main-Class": "ch.systemsx.cisd.openbis.dss.client.api.cli.DssClient", - "Version": versionNumber, - "Build-Number": "${versionNumber} (r${revisionNumber},${cleanFlag})", - "Class-Path": manifestClasspath ) - } -} - -task dssClientZip(type: Zip, dependsOn: dssClient) { - baseName 'dss_client' - - from (configurations.dssClientLibs) { - into 'dss_client/lib' - } - - from (dssClient.archivePath) { - into 'dss_client/lib' - } - - from(project(':datastore_server').file('dist/dss_client.sh')) { - into 'dss_client' - } -} diff --git a/openbis_standard_technologies/dss-upload-gui.gradle b/openbis_standard_technologies/dss-upload-gui.gradle deleted file mode 100644 index 99daad3d7a6..00000000000 --- a/openbis_standard_technologies/dss-upload-gui.gradle +++ /dev/null @@ -1,76 +0,0 @@ -configurations.create('dssGuiLibs') -configurations.create('dssGuiPartialLibs') - -dependencies { - - dssGuiLibs 'cglib:cglib-nodep:+', - 'cisd:cisd-args4j:+', - 'cisd:cisd-base:+', - 'apache:poi-ooxml:+', - 'springframework:spring:+', - 'apache:commons-logging:+', - 'python:jython:+', - 'apache:commons-httpclient:+', - 'marathon:marathon-spring-util:+', - 'apache:log4j:+', - 'dom4j:dom4j:+' - - dssGuiPartialLibs 'google:gwt-user:2.4' -} - -dssUploadGuiJars = ['cisd-base.jar', 'spring.jar', 'stream-supporting-httpinvoker.jar', - 'commons-codec.jar', 'commons-httpclient.jar', 'commons-io.jar', 'commons-lang.jar', - 'commons-logging.jar', 'jython.jar', 'dss_upload_gui.jar', 'log4j.jar', - 'poi.jar', 'poi-ooxml.jar', 'poi-ooxml-schemas.jar', 'dom4j-1.6.1.jar', - 'geronimo-stax-api_1.0_spec-1.0.jar', 'xmlbeans-2.3.0.jar'] - -jarsToBeSignedFolder = "${buildDir}/jars_to_be_signed" - -task dssGui(type: Jar) { - baseName 'dss_gui' - destinationDir = file(jarsToBeSignedFolder) - outputs.file new File(jarsToBeSignedFolder, archiveName) - - from (project(':common').compileJava.outputs.getFiles().getAsFileTree().plus( - project(':openbis-common').compileJava.outputs.getFiles().getAsFileTree().plus( - project(':openbis_api').compileJava.outputs.getFiles().getAsFileTree().plus( - project(':openbis').compileJava.outputs.getFiles().getAsFileTree().plus( - project(':datastore_server').compileJava.outputs.getFiles().getAsFileTree())))).matching { - include 'ch/systemsx/cisd/common/**/*.class' - include 'ch/systemsx/cisd/openbis/common/**/*.class' - include 'ch/systemsx/cisd/openbis/generic/shared/**/*.class' - include 'ch/systemsx/cisd/openbis/plugin/query/shared/**/*.class' - include 'ch/systemsx/cisd/openbis/dss/client/**/*.class' - include 'ch/systemsx/cisd/openbis/dss/generic/shared/api/**/*.class' - include 'ch/systemsx/cisd/openbis/dss/generic/shared/utils/**/*.class' - include 'org/python/core/SyspathArchiveHack.class' - include 'ch/systemsx/cisd/openbis/dss/BuildAndEnvironmentInfo.class' - }) - - from (project(':datastore_server').fileTree(dir: 'resource', includes: ['ok.png', 'wrong.png', 'wait.gif'])) - - from zipTree(configurations.dssGuiPartialLibs.files.iterator().next()).matching { - include '**/com/google/gwt/user/client/rpc/IsSerializable.class' - include '**/com/google/gwt/user/client/rpc/SerializableException.class' - } - - manifest { - def manifestClasspath = dssUploadGuiJars.collect { it }.join(',') - attributes("Main-Class": "ch.systemsx.cisd.openbis.dss.client.api.gui.DataSetUploadClient", - "Version": versionNumber, - "Build-Number": "${versionNumber} (r${revisionNumber},${cleanFlag})", - "Class-Path": manifestClasspath) - } -} - -task dssGuiZip(type: Zip, dependsOn: dssGui) { - baseName 'dss_upload_gui' - - from (configurations.dssGuiLibs) { - into 'dss_upload_gui/lib' - } - - from (dssGui.archivePath) { - into 'dss_upload_gui/lib' - } -} diff --git a/openbis_standard_technologies/gradle/wrapper/gradle-wrapper.properties b/openbis_standard_technologies/gradle/wrapper/gradle-wrapper.properties index b45c46f3d69..bd5acb2a4fe 100644 --- a/openbis_standard_technologies/gradle/wrapper/gradle-wrapper.properties +++ b/openbis_standard_technologies/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Oct 02 14:53:11 CEST 2013 +#Tue May 07 13:07:43 CEST 2013 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://svncisd.ethz.ch/repos/cisd/ivy-repository/trunk/gradle/distribution/1.5/gradle-1.5-bin.zip +distributionUrl=http\://svncisd.ethz.ch/repos/cisd/ivy-repository/trunk/gradle/distribution/1.8/gradle-1.8-all.zip -- GitLab