-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
executable file
·245 lines (206 loc) · 9.04 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
apply plugin: 'java'
apply plugin: 'eclipse'
wrapper {
gradleVersion = '7.2'
distributionType = org.gradle.api.tasks.wrapper.Wrapper.DistributionType.ALL
}
repositories {
mavenCentral()
// maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
ext {
apacheCxfVersion = '3.3.1'
copperVersion = '5.4.0'
springVersion = '5.2.9.RELEASE'
}
compileJava.options.encoding = 'utf-8'
//compileJava.sourceCompatibility = JavaVersion.VERSION_17
//compileJava.targetCompatibility = JavaVersion.VERSION_17
compileTestJava.options.encoding = 'utf-8'
//compileTestJava.sourceCompatibility = JavaVersion.VERSION_17
//compileTestJava.targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceSets {
workflow {
ext.srcDir = "$projectDir/src/workflow/java"
}
}
sourceSets.main.java.srcDirs += sourceSets.workflow.srcDir
configurations {
wsgen
}
sourceSets {
schema {
ext.srcDir = "$projectDir/src/main/schema"
}
}
sourceSets.main.resources.srcDirs += sourceSets.schema.srcDir
apply plugin: 'application'
mainClassName = "org.copperengine.examples.orchestration.enginemon.OrchestrationEngineWithMonitoring"
distZip {
into(project.name) {
from '.'
include 'src/main/resources/**/*'
}
into(project.name) {
from '.'
include "src/workflow/java/**/*"
}
into(project.name) {
from '.'
include "src/workflow_4_transient/java/**/*"
}
}
dependencies {
implementation "org.copper-engine:copper-coreengine:$copperVersion"
implementation "org.copper-engine:copper-jmx-interface:$copperVersion"
implementation "org.copper-engine:copper-spring:$copperVersion"
implementation 'org.copper-engine:copper-monitoring-core:4.2+'
implementation('org.copper-engine:copper-monitoring-server:4.2+') {
exclude module: 'log4j'
}
implementation('org.copper-engine:copper-monitoring-client:4.2+') {
exclude module: 'slf4j-log4j12'
exclude module: 'log4j'
}
implementation "org.springframework:spring-aop:$springVersion"
implementation "org.springframework:spring-beans:$springVersion"
implementation "org.springframework:spring-context:$springVersion"
implementation "org.springframework:spring-core:$springVersion"
implementation "org.springframework:spring-expression:$springVersion"
implementation "org.springframework:spring-jdbc:$springVersion"
implementation "org.springframework:spring-tx:$springVersion"
implementation 'org.springframework:spring-dao:2.0.8'
implementation 'com.oracle.database.jdbc:ojdbc10:19.7.0.0'
// implementation("org.springframework:spring-asm:3.1.4") {
// exclude group: "asm", module: "asm"
// }
implementation 'com.sun.activation:javax.activation:1.2.0'
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'javax.xml.bind:jaxb-api:2.3.0'
implementation('com.sun.xml.ws:jaxws-ri:2.3.0') {
exclude module: "jaxws-eclipselink-plugin"
exclude module: "sdo-eclipselink-plugin"
}
implementation("org.apache.cxf:cxf-rt-transports-http-jetty:$apacheCxfVersion") {
exclude module: 'spring-web'
exclude group: "asm", module: "asm"
}
implementation("org.apache.cxf:cxf-rt-frontend-jaxws:$apacheCxfVersion") {
exclude module: 'spring-web'
exclude group: "asm", module: "asm"
}
implementation 'org.eclipse.jetty:jetty-server:8.+'
// runtime 'org.apache.derby:derby:10.13.1.1'
// runtime "org.slf4j:slf4j-log4j12:1.7.21"
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.3.0-alpha5'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.3.0-alpha5'
wsgen "org.apache.cxf:cxf-tools-wsdlto-core:$apacheCxfVersion"
wsgen "org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:$apacheCxfVersion"
wsgen "org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:$apacheCxfVersion"
wsgen "org.apache.cxf.xjcplugins:cxf-xjc-ts:$apacheCxfVersion"
wsgen 'com.sun.activation:javax.activation:1.2.0'
wsgen 'javax.annotation:javax.annotation-api:1.3.2'
wsgen 'javax.xml.bind:jaxb-api:2.3.0'
wsgen('com.sun.xml.ws:jaxws-ri:2.3.0') {
exclude module: "jaxws-eclipselink-plugin"
exclude module: "sdo-eclipselink-plugin"
}
}
tasks.create(name: "gen_wsbindings", group: 'build') {
ext.genDirName = "$projectDir/src/main/generated";
inputs.dir file(sourceSets.schema.srcDir)
outputs.dir file(ext.genDirName)
doFirst {
file(ext.genDirName).mkdirs()
}
doLast {
fileTree(dir: sourceSets.schema.srcDir + "/wsdl", include: "**/*.wsdl", exclude: "common.wsdl").each {
def wsdlFile ->
javaexec {
main = 'org.apache.cxf.tools.wsdlto.WSDLToJava'
classpath = configurations.wsgen
// Add -DexitOnFinish=true so that WSDLToJava bails out with exit code 0 (on success) or 1 (on failure)
// so that the build aborts immediately on errors. If you don't set this property, the exit code is always 0.
systemProperty 'exitOnFinish', 'true'
jvmArgs = ['-Djavax.xml.accessExternalSchema=all', '-Duser.language=en']
args = ['-frontend', 'jaxws21',
'-db', 'jaxb',
'-xjc-extension',
'-impl', '-server', '-client', '-validate',
'-d', ext.genDirName,
'-wsdlLocation', 'classpath:wsdl/' + wsdlFile.name,
wsdlFile]
}
}
}
}
sourceSets.main.java.srcDirs += gen_wsbindings.genDirName
compileJava.dependsOn gen_wsbindings
eclipseClasspath.dependsOn gen_wsbindings
clean {
delete "$projectDir/src/main/generated"
}
jar {
manifest.attributes provider: 'gradle'
}
javadoc {
options.encoding = "UTF-8"
}
tasks.create(name: 'runHello', type: JavaExec, dependsOn: classes, group: 'run'){
classpath = sourceSets.main.runtimeClasspath
main = "org.copperengine.examples.simple.HelloWorldTestApplication"
}
tasks.create(name: 'runEngine', type: JavaExec, dependsOn: classes, group: 'run'){
classpath = sourceSets.main.runtimeClasspath
main = "org.copperengine.examples.orchestration.engine.OrchestrationEngine"
}
tasks.create(name: 'runEngineWithMonitoring', type: JavaExec, dependsOn: classes, group: 'run'){
classpath = sourceSets.main.runtimeClasspath
main = "org.copperengine.examples.orchestration.enginemon.OrchestrationEngineWithMonitoring"
}
tasks.create(name: 'runService', type: JavaExec, dependsOn: classes, group: 'run'){
classpath = sourceSets.main.runtimeClasspath
main = "org.copperengine.examples.orchestration.simulators.servers.ServiceSimulatorMain"
}
tasks.create(name: 'sendMessage', type: JavaExec, dependsOn: classes, group: 'run'){
classpath = sourceSets.main.runtimeClasspath
main = "org.copperengine.examples.orchestration.simulators.clients.OrchestrationServiceTestClient"
args = ["http://localhost:9092/services/orchestration?wsdl","491716677889","sc00p", "1"]
}
tasks.create(name: 'sendMessage_v2', type: JavaExec, dependsOn: classes, group: 'run'){
classpath = sourceSets.main.runtimeClasspath
main = "org.copperengine.examples.orchestration.simulators.clients.OrchestrationServiceTestClient"
args = ["http://localhost:9093/services/orchestration?wsdl","491716677889","sc00p"]
}
tasks.create(name: 'fireMessages', type: JavaExec, dependsOn: classes, group: 'run'){
classpath = sourceSets.main.runtimeClasspath
main = "org.copperengine.examples.orchestration.simulators.clients.OrchestrationServiceLoadTestClient"
args = ["http://localhost:9090/services/orchestration?wsdl"]
}
// be sure to always regenerate eclipse files, because default behavior is merging into existing files
tasks.eclipse.dependsOn cleanEclipse
eclipse {
classpath {
defaultOutputDir = file('build')
}
jdt {
file {
// add our code style settings to every eclipse project
withProperties { properties ->
def codestyle = new XmlParser().parse(file("$rootDir/config/eclipse-codestyle.xml"))
codestyle.profile[0].setting.each {
properties.put(it.'@id', it.'@value')
}
}
whenMerged {
def uiprops = new Properties();
uiprops.put('eclipse.preferences.version', '1')
uiprops.put('formatter_profile', '_SCOOP-CodeStyle')
uiprops.put('formatter_settings_version', '12')
uiprops.store(file("$projectDir/.settings/org.eclipse.jdt.ui.prefs").newWriter(), "generated by build.gradle")
}
}
}
}