Skip to content

Commit

Permalink
Merge pull request #110 from vert-x3/jpms-support
Browse files Browse the repository at this point in the history
JPMS support
  • Loading branch information
vietj authored Sep 24, 2024
2 parents b7d7920 + 4ee0443 commit 8e49b61
Show file tree
Hide file tree
Showing 39 changed files with 151 additions and 1,671 deletions.
72 changes: 18 additions & 54 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@
</scm>

<properties>
<testcontainersVersion>1.17.6</testcontainersVersion>
<testcontainersVersion>1.20.1</testcontainersVersion>
<junit.version>4.13.1</junit.version>

<grpc.version>1.50.2</grpc.version>
<protoc.version>3.21.8</protoc.version>

<jar.manifest>${project.basedir}/src/main/resources/META-INF/MANIFEST.MF</jar.manifest>
</properties>

Expand All @@ -40,6 +36,23 @@
</dependencyManagement>

<dependencies>

<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen-json</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-docgen-api</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen-api</artifactId>
Expand Down Expand Up @@ -82,11 +95,6 @@
<artifactId>vertx-unit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-grpc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -106,42 +114,7 @@
</dependencies>

<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.4.1.Final</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<configuration>
<!--
The version of protoc must match protobuf-java. If you don't depend on
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
<protocArtifact>com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<id>test-compile</id>
<configuration>
<outputDirectory>${project.basedir}/src/test/java</outputDirectory>
<clearOutputDirectory>false</clearOutputDirectory>
</configuration>
<goals>
<goal>test-compile</goal>
<goal>test-compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
Expand Down Expand Up @@ -183,15 +156,6 @@
</build>

<profiles>
<profile>
<id>java-17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
<profile>
<id>macos-m1</id>
<activation>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/vertx/ext/consul/impl/WatchImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public KeyPrefix(String keyPrefix, Vertx vertx, ConsulClientOptions options) {
}

@Override
void wait(long index, Handler<AsyncResult<State<KeyValueList>>> handler) {
protected void wait(long index, Handler<AsyncResult<State<KeyValueList>>> handler) {
BlockingQueryOptions options = new BlockingQueryOptions().setWait(timeout).setIndex(index);
consulClient.getValuesWithOptions(keyPrefix, options).onComplete(h ->
handler.handle(h.map(kv -> new State<>(kv, kv.getIndex()))));
Expand Down Expand Up @@ -346,7 +346,7 @@ public boolean failed() {
}
}

static class State<T> {
public static class State<T> {

final T value;
final long index;
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module io.vertx.consul.client {

requires static io.vertx.docgen;
requires static io.vertx.codegen.api;
requires static io.vertx.codegen.json;

requires io.netty.codec.http;
requires io.vertx.core;
requires io.vertx.web.client;

exports io.vertx.ext.consul;
exports io.vertx.ext.consul.policy;
exports io.vertx.ext.consul.token;

exports io.vertx.ext.consul.impl to io.vertx.consul.client.tests;

}
2 changes: 0 additions & 2 deletions src/main/resources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
Automatic-Module-Name: io.vertx.client.consul

Loading

0 comments on commit 8e49b61

Please sign in to comment.