Skip to content

Commit

Permalink
java reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
feuyeux committed Jul 7, 2024
1 parent c531161 commit 023874e
Show file tree
Hide file tree
Showing 10 changed files with 355 additions and 142 deletions.
75 changes: 48 additions & 27 deletions hello-grpc-java/client_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@
<groupId>org.feuyeux.grpc</groupId>
<artifactId>hello-grpc-java-client</artifactId>
<version>1.0.0-SNAPSHOT</version>

<properties>
<jdk.version>21</jdk.version>
<!-- https://mvnrepository.com/artifact/io.grpc/grpc-protobuf -->
<grpc.version>1.58.0</grpc.version>
<grpc.version>1.65.0</grpc.version>
<!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java -->
<protoc.version>3.24.3</protoc.version>
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<os-maven-plugin.version>1.7.0</os-maven-plugin.version>
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
<annotations-api.version>6.0.53</annotations-api.version>
<maven-shade-plugin.version>3.3.0</maven-shade-plugin.version>
<lombok.version>1.18.28</lombok.version>
<junit.version>5.10.0</junit.version>
<junit.version>5.10.2</junit.version>
<system-rules.version>1.19.0</system-rules.version>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
</properties>

<dependencies>
<!-- grpc -->
<!-- https://mvnrepository.com/artifact/io.grpc/grpc-netty -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
Expand Down Expand Up @@ -78,9 +80,8 @@
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-core</artifactId>
<version>0.7.6</version>
<version>0.8.2</version>
<exclusions>

<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
Expand All @@ -91,69 +92,73 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.1-jre</version>
<version>33.2.1-jre</version>
</dependency>

<!-- SLF4J Bridge slf4j to log4j2 -->
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.20.0</version>
<version>2.23.1</version>
</dependency>

<!-- lombok -->
<dependency>
<artifactId>lombok</artifactId>
<groupId>org.projectlombok</groupId>
<scope>provided</scope>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>annotations-api</artifactId>
<version>${annotations-api.version}</version>
<scope>provided</scope>
</dependency>


<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>4.1.111.Final</version>
<classifier>osx-x86_64</classifier>
</dependency>

<!-- junit5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/com.github.stefanbirkner/system-rules -->
<dependency>
<artifactId>system-rules</artifactId>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
<version>${system-rules.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>4.1.87.Final</version>
<classifier>osx-x86_64</classifier>
</dependency>
</dependencies>

<build>
<extensions>
<!-- https://mvnrepository.com/artifact/kr.motd.maven/os-maven-plugin -->
<extension>
<artifactId>os-maven-plugin</artifactId>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${os-maven-plugin.version}</version>
</extension>
</extensions>
<finalName>${project.name}</finalName>
<plugins>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<release>${jdk.version}</release>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<compilerArgs>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
Expand All @@ -179,6 +184,22 @@
</execution>
</executions>
</plugin>
<!-- https://mvnrepository.com/artifact/com.spotify.fmt/fmt-maven-plugin -->
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.23</version>
<executions>
<execution>
<goals>
<!-- Goal Default Phase -->
<!-- format process-sources-->
<!-- check verify-->
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
45 changes: 29 additions & 16 deletions hello-grpc-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<properties>
<jdk.version>21</jdk.version>
<!-- https://mvnrepository.com/artifact/io.grpc/grpc-protobuf -->
<grpc.version>1.64.0</grpc.version>
<grpc.version>1.65.0</grpc.version>
<!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java -->
<protoc.version>3.24.3</protoc.version>
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
Expand All @@ -24,7 +24,7 @@
</properties>

<dependencies>
<!-- grpc -->
<!-- https://mvnrepository.com/artifact/io.grpc/grpc-netty -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
Expand Down Expand Up @@ -82,7 +82,6 @@
<artifactId>jetcd-core</artifactId>
<version>0.8.2</version>
<exclusions>

<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -110,45 +109,56 @@
<version>${annotations-api.version}</version>
<scope>provided</scope>
</dependency>


<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>4.1.111.Final</version>
<classifier>osx-x86_64</classifier>
</dependency>

<!-- junit5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/com.github.stefanbirkner/system-rules -->
<dependency>
<artifactId>system-rules</artifactId>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
<version>${system-rules.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>4.1.111.Final</version>
<classifier>osx-x86_64</classifier>
</dependency>
</dependencies>

<build>
<extensions>
<!-- https://mvnrepository.com/artifact/kr.motd.maven/os-maven-plugin -->
<extension>
<artifactId>os-maven-plugin</artifactId>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${os-maven-plugin.version}</version>
</extension>
</extensions>
<finalName>${project.name}</finalName>
<plugins>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<release>${jdk.version}</release>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<compilerArgs>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
Expand All @@ -174,14 +184,17 @@
</execution>
</executions>
</plugin>
<!-- https://mvnrepository.com/artifact/com.coveo/fmt-maven-plugin -->
<!-- https://mvnrepository.com/artifact/com.spotify.fmt/fmt-maven-plugin -->
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<version>2.23</version>
<executions>
<execution>
<goals>
<!-- Goal Default Phase -->
<!-- format process-sources-->
<!-- check verify-->
<goal>format</goal>
</goals>
</execution>
Expand Down
Loading

0 comments on commit 023874e

Please sign in to comment.