Skip to content

Commit

Permalink
INTERNAL: Upgrade the JDK and dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhm0311 committed Aug 2, 2024
1 parent a62d14b commit 40a7a1b
Show file tree
Hide file tree
Showing 19 changed files with 264 additions and 176 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ concurrency:

jobs:
test:
runs-on: ubuntu-20.04
name: JDK ${{ matrix.jdk }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
jdk: [ 8, 11, 17 ]
os: [ ubuntu-20.04 ]
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: 'maven'
- name: Update apt-get
Expand All @@ -33,5 +39,5 @@ jobs:
# build server
cd ~/arcus && docker compose up -d
- name: Build ARCUS Client
- name: Test ARCUS Spring
run: mvn clean verify
131 changes: 93 additions & 38 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
<version>1.13.6</version>

<properties>
<org.springframework.version>4.3.10.RELEASE</org.springframework.version>
<org.slf4j.version>1.7.24</org.slf4j.version>
<org.apache.logging.log4j.version>2.17.1</org.apache.logging.log4j.version>
<arcus.client.version>1.13.4</arcus.client.version>
<com.google.code.findbugs.version>3.0.2</com.google.code.findbugs.version>
<junit.version>4.13.1</junit.version>
<org.mockito.version>1.7</org.mockito.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>8</java.version>
<arcus-java-client.version>1.14.0</arcus-java-client.version>
<zookeeper.verison>3.5.9</zookeeper.verison>
<spring.version>5.3.33</spring.version>
<log4j.version>2.23.1</log4j.version>
<slf4j.version>2.0.12</slf4j.version>
<junit.version>5.10.2</junit.version>
<mockito.version>4.11.0</mockito.version>
<findbugs-jsr305.version>3.0.2</findbugs-jsr305.version>
</properties>

<licenses>
Expand Down Expand Up @@ -72,7 +74,7 @@
<dependency>
<groupId>com.jam2in.arcus</groupId>
<artifactId>arcus-java-client</artifactId>
<version>${arcus.client.version}</version>
<version>${arcus-java-client.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand All @@ -82,13 +84,44 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>${zookeeper.verison}</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
<version>${spring.version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
Expand All @@ -101,64 +134,71 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${org.springframework.version}</version>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${org.apache.logging.log4j.version}</version>
<scope>provided</scope>
<version>${log4j.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${org.apache.logging.log4j.version}</version>
<scope>provided</scope>
<version>${log4j.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${org.apache.logging.log4j.version}</version>
<version>${log4j.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${com.google.code.findbugs.version}</version>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${org.mockito.version}</version>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- Provided -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${findbugs-jsr305.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand All @@ -167,25 +207,39 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>UTF-8</encoding>
<debug>true</debug>
<optimize>true</optimize>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-Xlint:-options</arg> <!-- For warning about old java version 6. -->
<arg>-Xlint:-options</arg> <!-- For warning about old java version 8. -->
<arg>-Xlint:-processing</arg> <!-- For meaningless warning about annotations -->
<arg>-Xlint:-classfile</arg> <!-- For provided spotbugs in ZK Client -->
<arg>-Werror</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<excludeArtifactIds>jmock,junit</excludeArtifactIds>
<outputDirectory>target</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
<execution>
<id>install</id>
<phase>install</phase>
Expand All @@ -198,8 +252,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<version>2.22.0</version>
<configuration>
<argLine>-Xshare:off</argLine>
<skipAfterFailureCount>1</skipAfterFailureCount>
</configuration>
</plugin>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/navercorp/arcus/spring/ArcusTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import net.spy.memcached.ArcusClient;
import net.spy.memcached.ArcusClientPool;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -32,9 +32,9 @@ public class ArcusTemplate {

private final Logger logger = LoggerFactory.getLogger(this.getClass());

private final ArcusClient arcusClient;
private final ArcusClientPool arcusClient;

public ArcusTemplate(ArcusClient arcusClient) {
public ArcusTemplate(ArcusClientPool arcusClient) {
this.arcusClient = arcusClient;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package com.navercorp.arcus.spring.cache;

import javax.annotation.Nullable;
import org.springframework.lang.Nullable;

public class ArcusStringKey {
public static int light_hash(String str) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

import java.util.concurrent.Future;

import net.spy.memcached.ArcusClient;
import net.spy.memcached.ArcusClientPool;

@Deprecated
public interface ArcusCallBack<T> {
Future<T> doInArcus(ArcusClient arcusClient);
Future<T> doInArcus(ArcusClientPool arcusClient);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.util.concurrent.Future;

import net.spy.memcached.ArcusClient;
import net.spy.memcached.ArcusClientPool;

@Deprecated
public class AsycGetMethod implements ArcusCallBack<Object> {
Expand All @@ -31,7 +31,7 @@ public AsycGetMethod(String key) {
}

@Override
public Future<Object> doInArcus(ArcusClient arcusClient) {
public Future<Object> doInArcus(ArcusClientPool arcusClient) {
return arcusClient.asyncGet(key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.util.concurrent.Future;

import net.spy.memcached.ArcusClient;
import net.spy.memcached.ArcusClientPool;

@Deprecated
public class AsyncLopDeleteByIndexMethod implements ArcusCallBack<Boolean> {
Expand All @@ -32,7 +32,7 @@ public AsyncLopDeleteByIndexMethod(String key, int index) {
}

@Override
public Future<Boolean> doInArcus(ArcusClient arcusClient) {
public Future<Boolean> doInArcus(ArcusClientPool arcusClient) {
return arcusClient.asyncLopDelete(key, index, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.util.concurrent.Future;

import net.spy.memcached.ArcusClient;
import net.spy.memcached.ArcusClientPool;

@Deprecated
public class AsyncLopDeleteByRangeMethod implements ArcusCallBack<Boolean> {
Expand All @@ -34,7 +34,7 @@ public AsyncLopDeleteByRangeMethod(String key, int from, int to) {
}

@Override
public Future<Boolean> doInArcus(ArcusClient arcusClient) {
public Future<Boolean> doInArcus(ArcusClientPool arcusClient) {
return arcusClient.asyncLopDelete(key, from, to, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.util.concurrent.Future;

import net.spy.memcached.ArcusClient;
import net.spy.memcached.ArcusClientPool;

@Deprecated
public class DeleteMethod implements ArcusCallBack<Boolean> {
Expand All @@ -30,7 +30,7 @@ public DeleteMethod(String key) {
}

@Override
public Future<Boolean> doInArcus(ArcusClient arcusClient) {
public Future<Boolean> doInArcus(ArcusClientPool arcusClient) {
return arcusClient.delete(key);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.util.concurrent.Future;

import net.spy.memcached.ArcusClient;
import net.spy.memcached.ArcusClientPool;

@Deprecated
public class SetMethod implements ArcusCallBack<Boolean> {
Expand All @@ -34,7 +34,7 @@ public SetMethod(String key, int expSeconds, String value) {
}

@Override
public Future<Boolean> doInArcus(ArcusClient arcusClient) {
public Future<Boolean> doInArcus(ArcusClientPool arcusClient) {
return arcusClient.set(key, expSeconds, value);
}
}
Loading

0 comments on commit 40a7a1b

Please sign in to comment.