Newer
Older
configurations.create('webStartJars')
configurations.create('appbundler')
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:+'
appbundler 'oracle:appbundler:+'
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
}
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, dependsOn: [createOpenbisJar, createDssClientJar]) {
from configurations.webStartJars.files
from (jarsToBeSignedFolder) {
include dssGuiClientJarName
rename { String fileName -> fileName.replace(dssGuiClientJarName, dssCliClientJarName)}
}
into jarsToBeSignedFolder
rename 'poi-[0-9]+.*\\.jar', 'poi.jar'
rename 'poi-ooxml-[0-9]+.*\\.jar', 'poi-ooxml.jar'
rename 'poi-ooxml-schemas-.*\\.jar', 'poi-ooxml-schemas.jar'
rename '(.+)-[0-9[r]]+.*\\.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: [copyJarsForWebStart]) {
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
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
}
}
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
task dssUploadGuiStandalone << {
logger.error("dssUploadGuiStandalone JAVA.HOME: "+System.properties.'java.home')
ant.taskdef(name: 'bundle', classname: 'com.oracle.appbundler.AppBundlerTask', classpath: configurations.appbundler.asPath)
ant.bundle(outputdirectory: "${buildDir}/distributions",
name: 'DataSetUploader',
displayname: 'Data Set Uploader',
identifier: 'ch.systemsx.cisd.openbis.dss.client.api.gui.DataSetUploadClient',
mainclassname: 'ch.systemsx.cisd.openbis.dss.client.api.gui.DataSetUploadClient') {
classpath(dir: "${signedJarsFolder}") {
include(name: "cglib-nodep.jar")
include(name: "cisd-args4j.jar")
include(name: "cisd-base.jar")
include(name: "commons-codec.jar")
include(name: "commons-httpclient.jar")
include(name: "commons-io.jar")
include(name: "commons-lang.jar")
include(name: "commons-logging.jar")
include(name: "dom4j-1.6.1.jar")
include(name: "dss_upload_gui.jar")
include(name: "geronimo-stax-api_1.0_spec-1.0.jar")
include(name: "jython.jar")
include(name: "log4j.jar")
include(name: "poi-ooxml-schemas.jar")
include(name: "poi-ooxml.jar")
include(name: "poi.jar")
include(name: "spring.jar")
include(name: "stream-supporting-httpinvoker.jar")
}
}
}
dssUploadGuiStandalone.dependsOn signWebStartJars