-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
364 lines (319 loc) · 11.5 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
}
plugins {
id 'net.researchgate.release' version '2.6.0'
id 'com.github.hierynomus.license' version '0.14.0'
id 'io.codearte.nexus-staging' version '0.9.0'
id 'com.palantir.docker' version '0.13.0'
id 'org.dm.bundle' version '0.10.0'
}
ext {
name = 'Camel Kafka ActivityStream Dataset'
description = 'A Camel LDP implementation'
vendor = 'pandorasystems'
homepage = 'http://www.trellisldp.org'
url = 'http://www.trellisldp.org/apidocs'
license = 'Apache 2'
inceptionYear = '2017'
}
configurations {
buildToolsConfig
}
dependencies {
buildToolsConfig "cool.pandora:pandora-build-tools:0.1.3"
}
task processBuildTools(type: Copy) {
from {
configurations.buildToolsConfig.collect {
zipTree(it).matching {
include 'checkstyle/*.xml'
include 'license/*.txt'
}
}
}
into 'build'
}
configure(allprojects) { project ->
apply plugin: 'application'
apply plugin: 'checkstyle'
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'org.dm.bundle'
apply plugin: 'com.github.hierynomus.license'
group = 'org.trellisldp.camel'
mainClassName = 'org.trellisldp.camel.kafka.activitystream.KafkaEventConsumer'
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "http://clojars.org/repo/"
}
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
options.compilerArgs += "-parameters"
}
ext {
camelVersion = '2.20.0'
camelLdpVersion = '0.1.0'
commonsIoVersion = "2.5"
commonsLangVersion = "3.5"
commonsCsvVersion = "1.4"
commonsRdfJenaVersion = "0.3.0-incubating"
commonsRdfVersion = '0.3.0-incubating'
dexxcollectionVersion = '0.6'
guavaVersion = "20.0"
httpclientVersion = "4.5.3"
httpcoreVersion = "4.4.6"
jacksonVersion = "2.9.0"
jsonldVersion = "0.11.1"
thriftVersion = "0.9.3"
trellisApiVersion = "0.3.0"
trellisIoJenaVersion = '0.2.1'
trellisVocabularyVersion = '0.1.0'
/* Testing */
junitVersion = '5.0.1'
junitPlatformVersion = '1.0.1'
jaxbVersion = '2.3.0'
jacocoVersion = '0.7.9'
jenaVersion = '3.5.0'
activationVersion = '1.1.1'
logbackVersion = '1.2.3'
apiguardianVersion = '1.0.0'
trellisIoJenaVersion = '0.2.1'
camelVersionRange = '[2.16,3)'
projectOsgiVersion = project.version.replaceAll("-SNAPSHOT", ".SNAPSHOT")
defaultOsgiImports = 'org.osgi.service.blueprint;version="[1,2)",*'
}
processResources {
filesNotMatching(["**/*.sh", "**/*.jar", "**/*.tar", "**/*.xml"]) {
expand(project.properties)
}
}
def dockerResourceDir = "${rootProject.buildDir}/resources/main/docker"
def mavenInstallPath = "repository/org/trellisldp/camel"
docker {
name 'trellisldp/activitystream-dataset'
tags "${version}"
dockerfile file("${dockerResourceDir}/Dockerfile")
files "activitystream-dataset/build/distributions/activitystream-dataset-${version}.tar",
"${dockerResourceDir}/entrypoint.sh"
// copySpec.from("${buildDir}/maven").into("${mavenInstallPath}")
pull true
noCache true
}
def homeDir = System.getProperty('user.home')
def mavenLocal = new File(homeDir, ".m2/repository/org/trellisldp/camel")
task copyTask(type: Copy) {
from mavenLocal
into "${rootProject.buildDir}/maven"
}
copyTask.dependsOn install
license {
include "**/*.java"
header rootProject.file('build/license/HEADER.txt')
strictCheck true
mapping {
java = 'SLASHSTAR_STYLE'
}
}
checkstyle {
configFile = rootProject.file('build/checkstyle/checkstyle.xml')
configProperties.checkstyleConfigDir = rootProject.file('build/checkstyle/')
toolVersion = '8.1'
}
checkstyleMain.dependsOn processBuildTools
}
configure(subprojects) { subproject ->
apply plugin: 'com.bmuschko.nexus'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
task deleteSubprojectFiles(type: Delete) {
delete "${projectDir}/settings.gradle", "${projectDir}/docs"
}
checkstyle {
configFile = rootProject.file('build/checkstyle/checkstyle.xml')
configProperties.checkstyleConfigDir = rootProject.file('build/checkstyle/')
toolVersion = "8.1"
}
task processConfig(type: Copy) {
from('src/main/resources/cfg') {
include '**/*.cfg'
}
into 'build/cfg/main'
}
task sourceJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourceJar
sourceSets.main.output
}
classes {
classes.dependsOn processConfig
}
jacoco {
toolVersion = "0.7.9"
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven {
url "${rootProject.buildDir}/maven"
}
}
}
modifyPom {
//noinspection GroovyAssignabilityCheck
project {
name name
description description
url url
inceptionYear inceptionYear
organization {
name vendor
url homepage
}
developers {
developer {
id 'acoburn'
name 'Aaron Coburn'
email 'acoburn @ (domain of organization url)'
organization 'Amherst College'
organizationUrl 'https://www.amherst.edu'
roles {
role 'developer'
}
timezone '-5'
}
developer {
id 'bseeger'
name 'Bethany Seeger'
email 'bseeger @ (domain of organization url)'
organization 'Amherst College'
organizationUrl 'https://www.amherst.edu'
roles {
role 'developer'
}
timezone '-5'
}
developer {
id 'christopher-johnson'
name 'Christopher Johnson'
email 'chjohnson @ (domain of organization url)'
organization ''
organizationUrl ''
roles {
role 'developer'
}
timezone '+1'
}
}
scm {
connection 'scm:git:git://github.com/ub-leipzig/camel-kafka-activitystream-dataset.git'
developerConnection 'scm:git:[email protected]/ub-leipzig/camel-kafka-activitystream-dataset.git'
url 'https://github.com/ub-leipzig/camel-kafka-activitystream-dataset/'
tag 'HEAD'
}
licenses {
license {
name 'Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
}
}
nexusStaging {
packageGroup = "cool.pandora"
stagingProfileId = "4d5f13c386f543"
}
nexus {
sign = true
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
project("camel-kafka-karaf") {
description = 'Karaf Provisioning Features for Camel-Kafka services'
processResources {
outputs.upToDateWhen { false }
expand project.properties
}
artifacts {
archives(file('build/resources/main/features.xml')) {
classifier 'features'
type 'xml'
}
}
}
project("activitystream-dataset") {
description = 'A Camel Kafka service'
dependencies {
implementation group: 'org.apache.camel', name: 'camel-core', version: camelVersion
implementation group: 'org.trellisldp', name: 'camel-ldp', version: camelLdpVersion
implementation group: 'org.apache.camel', name: 'camel-kafka', version: camelVersion
implementation group: 'org.apache.camel', name: 'camel-jackson', version: camelVersion
implementation group: 'org.apache.jena', name: 'jena-osgi', version: jenaVersion
implementation group: 'org.apache.commons', name: 'commons-rdf-api', version: commonsRdfVersion
implementation group: 'org.trellisldp', name: 'trellis-api', version: trellisApiVersion
implementation group: 'org.apache.commons', name: 'commons-rdf-jena', version: commonsRdfVersion
implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion
compile group: 'org.apache.jena', name: 'jena-fuseki-embedded', version: '3.5.0'
testImplementation group: 'org.apache.jena', name: 'jena-osgi', version: jenaVersion
testCompile group: 'org.apache.jena', name: 'jena-fuseki-embedded', version: '3.5.0'
testImplementation group: 'org.trellisldp', name: 'trellis-io-jena', version: trellisIoJenaVersion
testImplementation group: 'org.apache.camel', name: 'camel-kafka', version: camelVersion
testImplementation group: 'org.apache.camel', name: 'camel-jackson', version: camelVersion
testImplementation group: 'org.apiguardian', name: 'apiguardian-api', version: apiguardianVersion
testImplementation group: 'org.junit.platform', name: 'junit-platform-runner', version: junitPlatformVersion
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitVersion
testImplementation group: 'org.apache.camel', name: 'camel-test', version: camelVersion
testImplementation group: 'javax.xml.bind', name: 'jaxb-api', version: jaxbVersion
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion
testCompile group: 'org.apache.camel', name: 'camel-test-blueprint', version: camelVersion
testImplementation group: 'javax.activation', name: 'activation', version: activationVersion
}
jar {
manifest {
attributes 'Import-Package': "org.apache.camel,${defaultOsgiImports}",
'Export-Package': "org.trellisldp.camel.kafka.activitystream.dataset;version=${projectOsgiVersion}"
}
}
artifacts {
archives(file('build/cfg/main/org.trellisldp.camel.kafka.activitystream.cfg')) {
classifier 'configuration'
type 'cfg'
}
}
}
task submoduleUpdate(type: Exec) {
description = 'Updates and merges submodules'
executable = 'git'
args = ['submodule', 'update', '--remote', '--merge']
}