Skip to content

Commit 3c6556b

Browse files
committed
KMC-10 - First pass at generating a Kafka Component Archive that can be submitted to Confluent and made available on the Connector Hub.
1 parent 0a7f067 commit 3c6556b

File tree

4 files changed

+135
-0
lines changed

4 files changed

+135
-0
lines changed

MarkLogic_logo.png

3.43 KB
Loading

apache_logo.png

23.8 KB
Loading

build.gradle

+78
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ repositories {
1111
jcenter()
1212
}
1313

14+
configurations {
15+
documentation
16+
assets
17+
}
18+
1419
dependencies {
1520
compileOnly "org.apache.kafka:connect-api:2.1.0"
1621
compile ("com.marklogic:ml-javaclient-util:3.10.0") {
@@ -29,6 +34,13 @@ dependencies {
2934
testRuntime "ch.qos.logback:logback-classic:1.1.8"
3035
testRuntime group: "org.slf4j", name: "jcl-over-slf4j", version: "1.7.22"
3136
testRuntime group: "org.slf4j", name: "slf4j-api", version: "1.7.22"
37+
38+
documentation files('LICENSE.txt')
39+
documentation files('NOTICE.txt')
40+
documentation files('README.md')
41+
42+
assets files('MarkLogic_logo.png')
43+
assets files('apache_logo.png')
3244
}
3345

3446
// Needed by Gradle 4.6+ - see https://www.petrikainulainen.net/programming/testing/junit-5-tutorial-running-unit-tests-with-gradle/
@@ -57,4 +69,70 @@ task copyPropertyFilesToKafka(type: Copy) {
5769
task deploy {
5870
description = "Used for local development and testing; builds the jar and copies it and the properties files to your local Kafka install"
5971
dependsOn = ["jar", "copyJarToKafka", "copyPropertyFilesToKafka"]
72+
}
73+
74+
// Tasks for building the archive required for submitting to the Confluence Connector Hub
75+
task connectorArchive_CopyManifestToBuildDirectory(type: Copy) {
76+
description = "Copy the project manifest into the root folder"
77+
group = 'connector archive'
78+
79+
from '.'
80+
include 'manifest.json'
81+
into 'build/connectorArchive'
82+
}
83+
84+
task connectorArchive_CopyAssetsToBuildDirectory(type: Copy) {
85+
description = "Copy the project assets into the assets folder"
86+
group = 'connector archive'
87+
88+
from configurations.assets
89+
into 'build/connectorArchive/assets'
90+
}
91+
92+
task connectorArchive_CopyEtcToBuildDirectory(type: Copy) {
93+
description = "Copy the project support files into the etc folder"
94+
group = 'connector archive'
95+
96+
from 'config'
97+
include '*'
98+
into 'build/connectorArchive/etc'
99+
}
100+
101+
task connectorArchive_CopyDocumentationToBuildDirectory(type: Copy) {
102+
description = "Copy the project documentation into the doc folder"
103+
group = 'connector archive'
104+
105+
from configurations.documentation
106+
into 'build/connectorArchive/doc'
107+
}
108+
109+
task connectorArchive_CopyDependenciesToBuildDirectory(type: Copy) {
110+
description = "Copy the dependency jars into the lib folder"
111+
group = 'connector archive'
112+
dependsOn = [jar]
113+
114+
from jar
115+
from configurations.compile
116+
into 'build/connectorArchive/lib'
117+
}
118+
119+
task connectorArchive_BuildDirectory() {
120+
description = "Build the directory that will be used to create the Kafka Connector Archive"
121+
dependsOn = [connectorArchive_CopyManifestToBuildDirectory,
122+
connectorArchive_CopyDependenciesToBuildDirectory,
123+
connectorArchive_CopyDocumentationToBuildDirectory,
124+
connectorArchive_CopyEtcToBuildDirectory,
125+
connectorArchive_CopyAssetsToBuildDirectory]
126+
group = 'connector archive'
127+
}
128+
129+
task connectorArchive(type: Zip, dependsOn: connectorArchive_BuildDirectory) {
130+
description = 'Build a Connector Hub for the Confluent Connector Hub'
131+
group = 'connector archive'
132+
133+
from 'build/connectorArchive'
134+
include '*'
135+
include '*/*'
136+
archiveName 'confluentinc-kafka-marklogic-connector-0.1.0.zip'
137+
destinationDir(file('build/distro'))
60138
}

manifest.json

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"component_types": [
3+
"sink"
4+
],
5+
6+
"description": "This is a connector for getting data out of Apache Kafka into MarkLogic.\nIt is built off of the Kafka Connect framework, and therefore automatically supports pluggable encoding converters, single message transforms, and other useful features.\nMarkLogic 8+ is required.",
7+
8+
"documentation_url": "https://github.com/BillFarber/kafka-marklogic-connector",
9+
10+
"features": {
11+
"confluent_control_center_integration": true,
12+
"delivery_guarantee": [],
13+
"kafka_connect_api": true,
14+
"single_message_transforms": true,
15+
"supported_encodings": ["any"]
16+
},
17+
18+
"license": [
19+
{
20+
"name": "Apache License, Version 2.0",
21+
"url": "http://www.apache.org/licenses/LICENSE-2.0",
22+
"logo": "assets/apache_logo.png"
23+
}
24+
],
25+
26+
"logo": "assets/MarkLogic_logo.png",
27+
28+
"name": "kafka-marklogic-connector",
29+
30+
"owner": {
31+
"logo": "assets/MarkLogic_logo.jpg",
32+
"name": "MarkLogic Corporation",
33+
"type": "organization",
34+
"url": "https://www.marklogic.com/",
35+
"username": "XXXXXX"
36+
},
37+
38+
"requirements": [
39+
"MarkLogic 9.x"
40+
],
41+
42+
"support": {
43+
"logo": "assets/MarkLogic_logo.jpg",
44+
"provider_name": "MarkLogic Corporation",
45+
"summary": "This connector is provided 'as-is'. Support may be available from community members who contribute to it as an open-source project.",
46+
"url": "https://www.marklogic.com/"
47+
},
48+
49+
"tags": [
50+
"analytics",
51+
"marklogic"
52+
],
53+
54+
"title": "Kafka MarkLogic Connector",
55+
56+
"version": "1.0.0"
57+
}

0 commit comments

Comments
 (0)