forked from SolaceSamples/solace-samples-amqp-qpid-jms2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
69 lines (58 loc) · 2.02 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
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-amqp-qpid-jms2'
version = ''
jar {
baseName = 'solace-samples-amqp-qpid-jms2'
version = version
manifest {
attributes 'Implementation-Title': 'Solace Getting Started Samples',
'Implementation-Version': version
}
}
repositories {
mavenCentral()
}
dependencies {
compile("org.apache.qpid:qpid-jms-client:0.27.0")
}
task createAllStartScripts() << {
// just a placeholder
}
def scripts = [ 'topicPublisher':'com.solace.samples.TopicPublisher',
'topicSubscriber':'com.solace.samples.TopicSubscriber',
'durableTopicSubscriber':'com.solace.samples.DurableTopicSubscriber',
'queueProducer':'com.solace.samples.QueueProducer',
'queueConsumer':'com.solace.samples.QueueConsumer',
'basicRequestor':'com.solace.samples.BasicRequestor',
'basicReplier':'com.solace.samples.BasicReplier',
]
scripts.each() { scriptName, className ->
def t = tasks.create(name: scriptName+'StartScript', type: CreateStartScripts) {
mainClassName = className
applicationName = scriptName
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
}
applicationDistribution.into("bin") {
from(t)
fileMode = 0755
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
createAllStartScripts.dependsOn(t)
}
installDist {
destinationDir = new File(project.buildDir, 'staged')
}
assemble.dependsOn installDist