Skip to content

Commit d275f7e

Browse files
authored
Merge pull request #406 from splunk/fix-dependency
update pom.xml
2 parents 7004f1b + 11d219f commit d275f7e

File tree

4 files changed

+38
-21
lines changed

4 files changed

+38
-21
lines changed

dependency-reduced-pom.xml

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<plugins>
1010
<plugin>
1111
<artifactId>maven-shade-plugin</artifactId>
12-
<version>3.1.0</version>
12+
<version>3.4.1</version>
1313
<executions>
1414
<execution>
1515
<phase>package</phase>
@@ -29,7 +29,7 @@
2929
</plugin>
3030
<plugin>
3131
<artifactId>maven-compiler-plugin</artifactId>
32-
<version>3.7.0</version>
32+
<version>3.11.0</version>
3333
<configuration>
3434
<source>${java.version}</source>
3535
<target>${java.version}</target>
@@ -40,7 +40,7 @@
4040
</plugin>
4141
<plugin>
4242
<artifactId>maven-checkstyle-plugin</artifactId>
43-
<version>2.17</version>
43+
<version>3.2.1</version>
4444
<executions>
4545
<execution>
4646
<id>validate</id>
@@ -57,7 +57,7 @@
5757
<plugin>
5858
<groupId>org.jacoco</groupId>
5959
<artifactId>jacoco-maven-plugin</artifactId>
60-
<version>0.8.6</version>
60+
<version>0.8.9</version>
6161
<executions>
6262
<execution>
6363
<id>pre-unit-test</id>
@@ -89,7 +89,7 @@
8989
</plugin>
9090
<plugin>
9191
<artifactId>maven-surefire-plugin</artifactId>
92-
<version>2.22.2</version>
92+
<version>3.0.0</version>
9393
<configuration>
9494
<argLine>${surefireArgLine}</argLine>
9595
<skipTests>${skip.unit.tests}</skipTests>
@@ -107,11 +107,17 @@
107107
</plugin>
108108
</plugins>
109109
</build>
110+
<repositories>
111+
<repository>
112+
<id>confluent</id>
113+
<url>https://packages.confluent.io/maven/</url>
114+
</repository>
115+
</repositories>
110116
<dependencies>
111117
<dependency>
112118
<groupId>org.junit.jupiter</groupId>
113119
<artifactId>junit-jupiter-api</artifactId>
114-
<version>5.3.2</version>
120+
<version>5.9.2</version>
115121
<scope>test</scope>
116122
<exclusions>
117123
<exclusion>
@@ -139,7 +145,7 @@
139145
<dependency>
140146
<groupId>org.junit.platform</groupId>
141147
<artifactId>junit-platform-launcher</artifactId>
142-
<version>1.3.2</version>
148+
<version>1.9.2</version>
143149
<scope>test</scope>
144150
<exclusions>
145151
<exclusion>
@@ -151,7 +157,7 @@
151157
<dependency>
152158
<groupId>org.junit.jupiter</groupId>
153159
<artifactId>junit-jupiter-engine</artifactId>
154-
<version>5.3.2</version>
160+
<version>5.9.2</version>
155161
<scope>test</scope>
156162
<exclusions>
157163
<exclusion>
@@ -163,7 +169,7 @@
163169
<dependency>
164170
<groupId>org.junit.vintage</groupId>
165171
<artifactId>junit-vintage-engine</artifactId>
166-
<version>5.3.2</version>
172+
<version>5.9.2</version>
167173
<scope>test</scope>
168174
<exclusions>
169175
<exclusion>
@@ -175,32 +181,35 @@
175181
<dependency>
176182
<groupId>org.slf4j</groupId>
177183
<artifactId>slf4j-simple</artifactId>
178-
<version>1.7.26</version>
184+
<version>2.0.7</version>
179185
<scope>test</scope>
180186
</dependency>
181187
<dependency>
182188
<groupId>org.apiguardian</groupId>
183189
<artifactId>apiguardian-api</artifactId>
184-
<version>1.0.0</version>
190+
<version>1.1.2</version>
185191
<scope>test</scope>
186192
</dependency>
187193
</dependencies>
188194
<reporting>
189195
<plugins>
190196
<plugin>
191197
<artifactId>maven-jxr-plugin</artifactId>
192-
<version>2.3</version>
198+
<version>3.3.0</version>
193199
</plugin>
194200
</plugins>
195201
</reporting>
196202
<properties>
197-
<maven.compiler.target>1.8</maven.compiler.target>
198-
<java.version>1.8</java.version>
199-
<maven.compiler.source>1.8</maven.compiler.source>
203+
<jackson.version>2.14.2</jackson.version>
204+
<junit.platform.version>1.9.2</junit.platform.version>
205+
<slf4j.version>2.0.7</slf4j.version>
200206
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
201207
<junit.version>4.13.2</junit.version>
202-
<junit.jupiter.version>5.3.2</junit.jupiter.version>
203-
<junit.vintage.version>5.3.2</junit.vintage.version>
204-
<junit.platform.version>1.3.2</junit.platform.version>
208+
<junit.vintage.version>5.9.2</junit.vintage.version>
209+
<java.version>1.8</java.version>
210+
<maven.compiler.source>1.8</maven.compiler.source>
211+
<junit.jupiter.version>5.9.2</junit.jupiter.version>
212+
<kafka.version>3.4.0</kafka.version>
213+
<maven.compiler.target>1.8</maven.compiler.target>
205214
</properties>
206215
</project>

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,15 @@
186186
<artifactId>guava</artifactId>
187187
<version>32.0.1-jre</version>
188188
</dependency>
189+
<!-- https://mvnrepository.com/artifact/org.xerial.snappy/snappy-java -->
190+
<dependency>
191+
<groupId>org.xerial.snappy</groupId>
192+
<artifactId>snappy-java</artifactId>
193+
<version>1.1.10.1</version>
194+
<type>jar</type>
195+
<scope>compile</scope>
196+
</dependency>
197+
189198
</dependencies>
190199

191200
<repositories>

src/main/java/com/splunk/kafka/connect/SplunkSinkTask.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ private void timestampExtraction(Event event) {
579579
}
580580
} else {
581581
SimpleDateFormat df = new SimpleDateFormat(connectorConfig.timestampFormat);
582-
df.setTimeZone(TimeZone.getTimeZone("UTC"));
583582
Date date;
584583
try {
585584
if(!connectorConfig.timeZone.isEmpty())

src/test/java/com/splunk/kafka/connect/SplunkSinkTaskTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,14 @@ public void checkExtractedTimestampWithTimezone() {
309309
@Test
310310
public void checkExtractedTimestampWithoutTimezoneAsUTC() {
311311
SplunkSinkTask task = new SplunkSinkTask();
312-
Collection<SinkRecord> record = createSinkRecords(1,"{\"id\": \"19\",\"host\":\"host-01\",\"source\":\"bu\",\"fields\":{\"hn\":\"hostname1\",\"CLASS\":\"class1\",\"cust_id\":\"000013934\",\"REQ_TIME\": \"20230904133016993\",\"category\":\"IFdata\",\"ifname\":\"LoopBack7\",\"IFdata.Bits received\":\"0\",\"IFdata.Bits sent\":\"0\"}");
312+
Collection<SinkRecord> record = createSinkRecords(1,"{\"id\": \"19\",\"host\":\"host-01\",\"source\":\"bu\",\"fields\":{\"hn\":\"hostname1\",\"CLASS\":\"class1\",\"cust_id\":\"000013934\",\"REQ_TIME\": \"20230904133016993 UTC\",\"category\":\"IFdata\",\"ifname\":\"LoopBack7\",\"IFdata.Bits received\":\"0\",\"IFdata.Bits sent\":\"0\"}");
313313

314314
UnitUtil uu = new UnitUtil(0);
315315
Map<String, String> config = uu.createTaskConfig();
316316
config.put(SplunkSinkConnectorConfig.RAW_CONF, String.valueOf(false));
317317
config.put(SplunkSinkConnectorConfig.ENABLE_TIMESTAMP_EXTRACTION_CONF, String.valueOf(true));
318318
config.put(SplunkSinkConnectorConfig.REGEX_CONF, "\\\"REQ_TIME\\\":\\s*\\\"(?<time>.*?)\"");
319-
config.put(SplunkSinkConnectorConfig.TIMESTAMP_FORMAT_CONF, "yyyyMMddHHmmssSSS");
319+
config.put(SplunkSinkConnectorConfig.TIMESTAMP_FORMAT_CONF, "yyyyMMddHHmmssSSS zzz");
320320
config.put(SplunkSinkConnectorConfig.TIMESTAMP_TIMEZONE_CONF, "");
321321
HecMock hec = new HecMock(task);
322322
hec.setSendReturnResult(HecMock.success);

0 commit comments

Comments
 (0)