Skip to content

Commit 16a4a1c

Browse files
authored
build: refactor maven module structure (#5)
* build: refactor maven module structure * fix: add missing import * build: add runtime scope to the licensing plugin
1 parent e5ea20e commit 16a4a1c

File tree

77 files changed

+1821
-993
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1821
-993
lines changed

.teamcity/builds/Build.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Build(name: String, branchFilter: String, forPullRequests: Boolean) :
1010
this.id(name.toId())
1111
this.name = name
1212

13-
val packaging = Maven("${name}-package", "package", "package", "-DskipTests")
13+
val packaging = Maven("${name}-package", "package", "package", "-pl :packaging -am -DskipTests")
1414

1515
val bts = sequential {
1616
if (forPullRequests)

LICENSE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

@@ -178,15 +178,15 @@
178178
APPENDIX: How to apply the Apache License to your work.
179179

180180
To apply the Apache License to your work, attach the following
181-
boilerplate notice, with the fields enclosed by brackets "{}"
181+
boilerplate notice, with the fields enclosed by brackets "[]"
182182
replaced with your own identifying information. (Don't include
183183
the brackets!) The text should be enclosed in the appropriate
184184
comment syntax for the file format. We also recommend that a
185185
file or class name and description of purpose be included on the
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright {yyyy} {name of copyright owner}
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

common/LICENSES.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ libraries. For an overview of the licenses see the NOTICE.txt file.
55
------------------------------------------------------------------------------
66
Apache Software License, Version 2.0
77
Apache Commons Lang
8+
Apache FreeMarker
9+
connect-utils
10+
error-prone annotations
11+
FindBugs-jsr305
12+
Guava InternalFutureFailureAccess and InternalFutures
13+
Guava ListenableFuture only
14+
Guava: Google Core Libraries for Java
815
IntelliJ IDEA Annotations
16+
J2ObjC Annotations
917
Jackson-annotations
1018
Jackson-core
1119
jackson-databind
@@ -17,6 +25,7 @@ Apache Software License, Version 2.0
1725
Kotlin Stdlib Jdk8
1826
kotlinx-coroutines-core
1927
Neo4j Java Driver
28+
org.immutables.value
2029
------------------------------------------------------------------------------
2130

2231
Apache License
@@ -352,4 +361,33 @@ express Statement of Purpose.
352361

353362

354363

364+
------------------------------------------------------------------------------
365+
MIT License
366+
Checker Qual
367+
------------------------------------------------------------------------------
368+
369+
The MIT License
370+
371+
Copyright (c) <year> <copyright holders>
372+
373+
Permission is hereby granted, free of charge, to any person obtaining a copy
374+
of this software and associated documentation files (the "Software"), to deal
375+
in the Software without restriction, including without limitation the rights
376+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
377+
copies of the Software, and to permit persons to whom the Software is
378+
furnished to do so, subject to the following conditions:
379+
380+
The above copyright notice and this permission notice shall be included in
381+
all copies or substantial portions of the Software.
382+
383+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
384+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
385+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
386+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
387+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
388+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
389+
THE SOFTWARE.
390+
391+
392+
355393

common/NOTICE.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ Third-party licenses
2020

2121
Apache Software License, Version 2.0
2222
Apache Commons Lang
23+
Apache FreeMarker
24+
connect-utils
25+
error-prone annotations
26+
FindBugs-jsr305
27+
Guava InternalFutureFailureAccess and InternalFutures
28+
Guava ListenableFuture only
29+
Guava: Google Core Libraries for Java
2330
IntelliJ IDEA Annotations
31+
J2ObjC Annotations
2432
Jackson-annotations
2533
Jackson-core
2634
jackson-databind
@@ -32,7 +40,11 @@ Apache Software License, Version 2.0
3240
Kotlin Stdlib Jdk8
3341
kotlinx-coroutines-core
3442
Neo4j Java Driver
43+
org.immutables.value
3544

3645
Creative Commons 0
3746
reactive-streams
3847

48+
MIT License
49+
Checker Qual
50+

common/pom.xml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,22 @@
99
</parent>
1010
<artifactId>common</artifactId>
1111
<packaging>jar</packaging>
12-
<name>Neo4j Kafka Connector - Common</name>
12+
<name>common</name>
13+
<description>Neo4j Connector for Kafka - Common</description>
14+
<properties>
15+
<connect-utils.version>0.7.173</connect-utils.version>
16+
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
17+
</properties>
1318
<dependencies>
1419
<dependency>
1520
<groupId>com.fasterxml.jackson.module</groupId>
1621
<artifactId>jackson-module-kotlin</artifactId>
1722
</dependency>
23+
<dependency>
24+
<groupId>com.github.jcustenborder.kafka.connect</groupId>
25+
<artifactId>connect-utils</artifactId>
26+
<version>${connect-utils.version}</version>
27+
</dependency>
1828
<dependency>
1929
<groupId>org.apache.commons</groupId>
2030
<artifactId>commons-lang3</artifactId>
@@ -31,6 +41,12 @@
3141
<groupId>org.neo4j.driver</groupId>
3242
<artifactId>neo4j-java-driver</artifactId>
3343
</dependency>
44+
<dependency>
45+
<groupId>org.apache.kafka</groupId>
46+
<artifactId>connect-api</artifactId>
47+
<version>${kafka.version}</version>
48+
<scope>provided</scope>
49+
</dependency>
3450
<dependency>
3551
<groupId>org.apache.kafka</groupId>
3652
<artifactId>kafka-clients</artifactId>
@@ -57,4 +73,21 @@
5773
<scope>test</scope>
5874
</dependency>
5975
</dependencies>
76+
<build>
77+
<plugins>
78+
<plugin>
79+
<artifactId>maven-resources-plugin</artifactId>
80+
<version>${maven-resources-plugin.version}</version>
81+
<configuration>
82+
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
83+
<resources>
84+
<resource>
85+
<directory>src/main/resources</directory>
86+
<filtering>true</filtering>
87+
</resource>
88+
</resources>
89+
</configuration>
90+
</plugin>
91+
</plugins>
92+
</build>
6093
</project>

kafka-connect-neo4j/src/main/kotlin/streams/kafka/connect/common/Neo4jConnectorConfig.kt renamed to common/src/main/kotlin/streams/kafka/connect/common/Neo4jConnectorConfig.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import org.apache.kafka.common.config.ConfigException
3232
import org.neo4j.driver.*
3333
import org.neo4j.driver.internal.async.pool.PoolSettings
3434
import org.neo4j.driver.net.ServerAddress
35-
import streams.kafka.connect.sink.AuthenticationType
3635
import streams.kafka.connect.utils.PropertiesUtil
3736

3837
object ConfigGroup {
@@ -51,6 +50,12 @@ enum class ConnectorType {
5150
SOURCE
5251
}
5352

53+
enum class AuthenticationType {
54+
NONE,
55+
BASIC,
56+
KERBEROS
57+
}
58+
5459
open class Neo4jConnectorConfig(
5560
configDef: ConfigDef,
5661
originals: Map<*, *>,

kafka-connect-neo4j/src/main/kotlin/streams/kafka/connect/utils/PropertiesUtil.kt renamed to common/src/main/kotlin/streams/kafka/connect/utils/PropertiesUtil.kt

File renamed without changes.

kafka-connect-neo4j/src/main/resources/kafka-connect-neo4j.properties renamed to common/src/main/resources/kafka-connect-neo4j.properties

File renamed without changes.

kafka-connect-neo4j/src/main/resources/kafka-connect-version.properties renamed to common/src/main/resources/kafka-connect-version.properties

File renamed without changes.

kafka-connect-neo4j/README.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)