-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
96 lines (76 loc) · 2.54 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
plugins {
id 'application'
}
applicationDefaultJvmArgs = ["-Xms512m", "-Xmx1024m"]
repositories {
mavenCentral()
}
// Set default broker if not specified from command line
def whichBroker = project.properties['broker']?:'ActiveMQ'
dependencies {
implementation 'ch.qos.logback:logback-classic:1.2.0'
implementation 'javax.jms:javax.jms-api:2.0'
switch (whichBroker) {
case "ActiveMQ":
runtimeOnly 'org.apache.activemq:activemq-client:5.15.12'
runtimeOnly 'org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:1.0.1'
break;
case "Artemis":
runtimeOnly 'org.apache.activemq:artemis-jms-client-all:2.11.0'
break;
case "TIBCO":
runtimeOnly files('local_libs/tibjms.jar')
break;
case "IBM_MQ":
runtimeOnly 'com.ibm.mq:com.ibm.mq.allclient:9.1.3.0'
runtimeOnly files('local_libs/fscontext.jar','local_libs/providerutil.jar')
break;
case "WebLogic":
runtimeOnly files('local_libs/wlthint3client.jar')
break;
/* In case of different broker, please add a new 'case' here:
case "<JMS_BROKER>":
runtimeOnly '<DEP1>'
...
runtimeOnly '<DEP_N>'
break;
where:
JMS_BROKER
is a generic string that identifies the broker for which this build is targeted.
DEP_X
is the reference to the JMS broker-specific java library. If the library is not available
on JCenter, please copy it under the "local_libs" folder, as already done with TIBCO.
*/
default:
println "No broker definition"
}
}
version = '3.0.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
application {
mainClass = "com.lightstreamer.jms.demo.stocklist_service.App"
applicationDefaultJvmArgs = ["-Dbroker=$whichBroker"]
}
tasks.register('makeFeedMessageJar', Jar) {
archiveBaseName = commonJarName
from sourceSets.main.output.classesDirs.filter {
include 'com/lightstreamer/jms/demo/stocklist_service/message/FeedMessage.class'
}
}
tasks.register("distribuite", Copy) {
dependsOn installDist
into "$buildDir/$deployDir"
from makeFeedMessageJar
from (configurations.runtimeClasspath) {
exclude "javax.jms-api-*.jar"
exclude "logback-*.jar"
exclude "slf4j-*.jar"
}
}
tasks.named('build') {
dependsOn('distribuite', 'installDist')
}