Skip to content

Commit d32cc52

Browse files
authored
build: fix build warnings (#12)
* build: fix Maven-related warnings - move resource filtering out of plugin configuration - only enable Kotlin compilation on JAR modules - disable unneeded Kotlin extensions - fix duplicate assembly IDs (manually append suffix for OSS JARs) * test: fix SLF4J provider warning
1 parent a654010 commit d32cc52

File tree

9 files changed

+71
-45
lines changed

9 files changed

+71
-45
lines changed

common/pom.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,16 @@
6969
</dependency>
7070
</dependencies>
7171
<build>
72+
<resources>
73+
<resource>
74+
<filtering>true</filtering>
75+
<directory>src/main/resources</directory>
76+
</resource>
77+
</resources>
7278
<plugins>
7379
<plugin>
74-
<artifactId>maven-resources-plugin</artifactId>
75-
<version>${maven-resources-plugin.version}</version>
76-
<configuration>
77-
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
78-
<resources>
79-
<resource>
80-
<directory>src/main/resources</directory>
81-
<filtering>true</filtering>
82-
</resource>
83-
</resources>
84-
</configuration>
80+
<groupId>org.jetbrains.kotlin</groupId>
81+
<artifactId>kotlin-maven-plugin</artifactId>
8582
</plugin>
8683
</plugins>
8784
</build>

packaging/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
<descriptor>src/main/assemblies/kafka-jar.xml</descriptor>
7979
<descriptor>src/main/assemblies/kafka-zip.xml</descriptor>
8080
</descriptors>
81-
<appendAssemblyId>true</appendAssemblyId>
82-
<finalName>neo4j-kafka-connect-neo4j-${project.version}</finalName>
81+
<appendAssemblyId>false</appendAssemblyId>
82+
<finalName>neo4j-kafka-connect-neo4j-${project.version}-kc-oss</finalName>
8383
</configuration>
8484
</execution>
8585
</executions>

packaging/src/main/assemblies/confluent-jar.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 https://maven.apache.org/xsd/assembly-2.2.0.xsd">
4-
<id>confluent</id>
4+
<id>confluent-jar</id>
55

66
<formats>
77
<format>jar</format>
@@ -27,7 +27,7 @@
2727
<dependencySets>
2828
<dependencySet>
2929
<outputDirectory>/</outputDirectory>
30-
<useProjectArtifact>true</useProjectArtifact>
30+
<useProjectArtifact>false</useProjectArtifact>
3131
<unpack>true</unpack>
3232
<scope>runtime</scope>
3333
<useStrictFiltering>true</useStrictFiltering>

packaging/src/main/assemblies/confluent-zip.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd">
5-
<id>confluent</id>
5+
<id>confluent-zip</id>
66

77
<formats>
88
<format>zip</format>

packaging/src/main/assemblies/kafka-jar.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 https://maven.apache.org/xsd/assembly-2.2.0.xsd">
4-
<id>kc-oss</id>
4+
<id>kc-oss-jar</id>
55

66
<formats>
77
<format>jar</format>
@@ -27,7 +27,7 @@
2727
<dependencySets>
2828
<dependencySet>
2929
<outputDirectory>/</outputDirectory>
30-
<useProjectArtifact>true</useProjectArtifact>
30+
<useProjectArtifact>false</useProjectArtifact>
3131
<unpack>true</unpack>
3232
<scope>runtime</scope>
3333
</dependencySet>

packaging/src/main/assemblies/kafka-zip.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd">
5-
<id>kc-oss</id>
5+
<id>kc-oss-zip</id>
66

77
<formats>
88
<format>zip</format>

pom.xml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
<junit-jupiter.version>5.10.0</junit-jupiter.version>
4949
<kafka-avro-serializer.version>5.2.2</kafka-avro-serializer.version>
5050
<kafka.version>2.6.3</kafka.version>
51-
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
5251
<kotlin.coroutines.version>1.7.3</kotlin.coroutines.version>
5352
<kotlin.version>1.9.0</kotlin.version>
5453
<license-maven-plugin.version>4.2</license-maven-plugin.version>
@@ -62,7 +61,7 @@
6261
<neo4j-java-driver.version>4.4.9</neo4j-java-driver.version>
6362
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6463
<reactor.version>2022.0.11</reactor.version>
65-
<slf4j-api.version>2.0.9</slf4j-api.version>
64+
<slf4j.version>2.0.9</slf4j.version>
6665
<sortpom-maven-plugin.version>3.3.0</sortpom-maven-plugin.version>
6766
<spotless-maven-plugin.version>2.38.0</spotless-maven-plugin.version>
6867
<testcontainers.version>1.19.0</testcontainers.version>
@@ -169,7 +168,12 @@
169168
<dependency>
170169
<groupId>org.slf4j</groupId>
171170
<artifactId>slf4j-api</artifactId>
172-
<version>${slf4j-api.version}</version>
171+
<version>${slf4j.version}</version>
172+
</dependency>
173+
<dependency>
174+
<groupId>org.slf4j</groupId>
175+
<artifactId>slf4j-nop</artifactId>
176+
<version>${slf4j.version}</version>
173177
</dependency>
174178
<dependency>
175179
<groupId>org.testcontainers</groupId>
@@ -227,32 +231,31 @@
227231
</execution>
228232
</executions>
229233
</plugin>
234+
<plugin>
235+
<groupId>org.jetbrains.kotlin</groupId>
236+
<artifactId>kotlin-maven-plugin</artifactId>
237+
<version>${kotlin.version}</version>
238+
<configuration>
239+
<jvmTarget>${java.version}</jvmTarget>
240+
</configuration>
241+
<executions>
242+
<execution>
243+
<id>compile</id>
244+
<goals>
245+
<goal>compile</goal>
246+
</goals>
247+
</execution>
248+
<execution>
249+
<id>test-compile</id>
250+
<goals>
251+
<goal>test-compile</goal>
252+
</goals>
253+
</execution>
254+
</executions>
255+
</plugin>
230256
</plugins>
231257
</pluginManagement>
232258
<plugins>
233-
<plugin>
234-
<groupId>org.jetbrains.kotlin</groupId>
235-
<artifactId>kotlin-maven-plugin</artifactId>
236-
<version>${kotlin.version}</version>
237-
<extensions>true</extensions>
238-
<configuration>
239-
<jvmTarget>${java.version}</jvmTarget>
240-
</configuration>
241-
<executions>
242-
<execution>
243-
<id>compile</id>
244-
<goals>
245-
<goal>compile</goal>
246-
</goals>
247-
</execution>
248-
<execution>
249-
<id>test-compile</id>
250-
<goals>
251-
<goal>test-compile</goal>
252-
</goals>
253-
</execution>
254-
</executions>
255-
</plugin>
256259
<plugin>
257260
<groupId>org.apache.maven.plugins</groupId>
258261
<artifactId>maven-compiler-plugin</artifactId>

sink/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
<artifactId>mockito-core</artifactId>
3939
<scope>test</scope>
4040
</dependency>
41+
<dependency>
42+
<groupId>org.slf4j</groupId>
43+
<artifactId>slf4j-nop</artifactId>
44+
<scope>test</scope>
45+
</dependency>
4146
<dependency>
4247
<groupId>org.testcontainers</groupId>
4348
<artifactId>junit-jupiter</artifactId>
@@ -49,4 +54,12 @@
4954
<scope>test</scope>
5055
</dependency>
5156
</dependencies>
57+
<build>
58+
<plugins>
59+
<plugin>
60+
<groupId>org.jetbrains.kotlin</groupId>
61+
<artifactId>kotlin-maven-plugin</artifactId>
62+
</plugin>
63+
</plugins>
64+
</build>
5265
</project>

source/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
<artifactId>mockito-core</artifactId>
4848
<scope>test</scope>
4949
</dependency>
50+
<dependency>
51+
<groupId>org.slf4j</groupId>
52+
<artifactId>slf4j-nop</artifactId>
53+
<scope>test</scope>
54+
</dependency>
5055
<dependency>
5156
<groupId>org.testcontainers</groupId>
5257
<artifactId>junit-jupiter</artifactId>
@@ -58,4 +63,12 @@
5863
<scope>test</scope>
5964
</dependency>
6065
</dependencies>
66+
<build>
67+
<plugins>
68+
<plugin>
69+
<groupId>org.jetbrains.kotlin</groupId>
70+
<artifactId>kotlin-maven-plugin</artifactId>
71+
</plugin>
72+
</plugins>
73+
</build>
6174
</project>

0 commit comments

Comments
 (0)