Skip to content
Snippets Groups Projects
Commit a02f8d30 authored by felmer's avatar felmer
Browse files

SP-970, SWE-22: refactoring dss client creation. having only one dss client zip.

SVN: 30091
parent 12644ab2
No related branches found
No related tags found
No related merge requests found
...@@ -14,8 +14,7 @@ apply from: 'http://svncisd.ethz.ch/repos/cisd/gradle/trunk/javaproject.gradle' ...@@ -14,8 +14,7 @@ apply from: 'http://svncisd.ethz.ch/repos/cisd/gradle/trunk/javaproject.gradle'
apply from: 'query-api.gradle' apply from: 'query-api.gradle'
apply from: 'screening-api.gradle' apply from: 'screening-api.gradle'
apply from: 'proteomics-api.gradle' apply from: 'proteomics-api.gradle'
apply from: 'dss-client.gradle' apply from: 'clients.gradle'
apply from: 'dss-upload-gui.gradle'
apply from: 'admin-console.gradle' apply from: 'admin-console.gradle'
apply plugin: 'war' apply plugin: 'war'
...@@ -25,7 +24,6 @@ archivesBaseName = 'openBIS-server-standard-technologies' ...@@ -25,7 +24,6 @@ archivesBaseName = 'openBIS-server-standard-technologies'
configurations.create('gwt') configurations.create('gwt')
configurations.create('zipping') configurations.create('zipping')
configurations.create('datastore_server') configurations.create('datastore_server')
configurations.create('webStartJars')
def jettyVersion = '8.1.8' def jettyVersion = '8.1.8'
...@@ -55,31 +53,6 @@ dependencies { ...@@ -55,31 +53,6 @@ dependencies {
'slf4j:slf4j:+', 'slf4j:slf4j:+',
'slf4j:slf4j-log4j12:+', 'slf4j:slf4j-log4j12:+',
'sybit:image-viewer:+' '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 { buildscript {
...@@ -188,60 +161,6 @@ task checkFilesExist { ...@@ -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 compileGwt
war.dependsOn checkFilesExist war.dependsOn checkFilesExist
...@@ -388,8 +307,10 @@ task zipDss(type: Zip, dependsOn: signWebStartJars) { ...@@ -388,8 +307,10 @@ task zipDss(type: Zip, dependsOn: signWebStartJars) {
rename 'common-.*jar', 'common.jar' rename 'common-.*jar', 'common.jar'
} }
from (files(dssUploadGuiJars.collect({"${signedJarsFolder}/${it}"}))) { from (signedJarsFolder) {
into 'datastore_server/lib/dss_upload_gui' into 'datastore_server/lib/dss_upload_gui'
exclude openbisClientJarName
exclude dssCliClientJarName
} }
from (project(':datastore_server').fileTree(dir: 'dist', includes: ['**/*'], excludes:['dss_client.sh', 'etc/**'])) { from (project(':datastore_server').fileTree(dir: 'dist', includes: ['**/*'], excludes:['dss_client.sh', 'etc/**'])) {
...@@ -416,10 +337,6 @@ task zipDss(type: Zip, dependsOn: signWebStartJars) { ...@@ -416,10 +337,6 @@ task zipDss(type: Zip, dependsOn: signWebStartJars) {
into 'datastore_server/server/etc' 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( 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(':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'])))) { 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) { ...@@ -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' baseName 'openBIS-clients-and-APIs'
from dssClientZip.archivePath from dssClientZip.archivePath
from dssGuiZip.archivePath
from queryApiZip.archivePath from queryApiZip.archivePath
from proteomicsApiZip.archivePath from proteomicsApiZip.archivePath
from screeningApiZip.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') 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 zip
build.dependsOn zipDss build.dependsOn zipDss
......
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
}
}
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'
}
}
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'
}
}
#Wed Oct 02 14:53:11 CEST 2013 #Tue May 07 13:07:43 CEST 2013
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment