forked from SolaceSamples/solace-samples-jms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
121 lines (104 loc) · 4.17 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'application'
// Don't need these task, so disabling them. Makes it possible to avoid
// declaring a single application main class.
startScripts.enabled = false
run.enabled = false
// Also don't need the regular application distribution packages since
// this is just a set of samples. So disabling to make the build output
// cleaner
distTar.enabled=false
distZip.enabled=false
applicationName = 'solace-samples-jms'
//version = ''
jar {
archiveBaseName = 'solace-samples-jms'
archiveVersion = ''
manifest {
attributes 'Implementation-Title': 'Solace Getting Started Samples',
'Implementation-Version': ''
}
}
// Download context sensitive help and/or source code for eclipse and idea
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
jdt {
//if you want to alter the java versions (by default they are configured with gradle java plugin settings):
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
repositories {
mavenCentral()
}
dependencies {
// Solace Messaging API for JMS Dependencies
implementation group: 'com.solacesystems', name:'sol-jms', version: '[10.25.0,)'
implementation group: 'javax.jms', name: 'javax.jms-api', version: '2.0.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.+'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.+'
implementation group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: '2.+'
//OpenTelemetry dependency
implementation group: 'io.opentelemetry', name: 'opentelemetry-exporter-otlp', version: '1.+'
implementation group: 'io.opentelemetry.semconv', name: 'opentelemetry-semconv', version: '1.+'
//Solace OpenTelemetry Integration for JMS
implementation group: 'com.solace', name: 'solace-opentelemetry-jms-integration', version: '1.1.0'
// For any local libs that are not available from mavenCentral
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
sourceSets {
main {
java {
srcDir 'src/main/java'
exclude '**/DirectProcessor.java'
}
}
}
def scripts = [
'HelloWorld':'com.solace.samples.jms.HelloWorld',
'NonPersistentProcessor':'com.solace.samples.jms.patterns.NonPersistentProcessor',
'NonPersistentPublisher':'com.solace.samples.jms.patterns.NonPersistentPublisher',
'NonPersistentSubscriber':'com.solace.samples.jms.patterns.NonPersistentSubscriber',
'topicPublisher': 'com.solace.samples.TopicPublisher',
'topicSubscriber':'com.solace.samples.TopicSubscriber',
'queueProducer':'com.solace.samples.QueueProducer',
'queueConsumer':'com.solace.samples.QueueConsumer',
'basicRequestor':'com.solace.samples.BasicRequestor',
'basicReplier':'com.solace.samples.BasicReplier',
'queueProducerJNDI':'com.solace.samples.QueueProducerJNDI',
'queueConsumerJNDI':'com.solace.samples.QueueConsumerJNDI',
'extJndiImport':'com.solace.samples.ExtJndiImport',
'extJndiTest':'com.solace.samples.ExtJndiTest',
'dtQueuePublisher':'com.solace.samples.features.distributedtracing.manualinstrumentation.QueuePublisher',
'dtQueueSubscriber':'com.solace.samples.features.distributedtracing.manualinstrumentation.QueueSubscriber',
'dtTopicPublisher':'com.solace.samples.features.distributedtracing.manualinstrumentation.TopicPublisher',
]
scripts.each() { scriptName, className ->
def t = tasks.create(name: scriptName+'StartScript', type: CreateStartScripts) {
mainClass = className
applicationName = scriptName
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtimeClasspath
}
applicationDistribution.into("bin") {
from(t)
fileMode = 0755
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
//createAllStartScripts.dependsOn(t)
}
installDist {
destinationDir = new File(project.buildDir, 'staged')
}
assemble.dependsOn installDist