Skip to content

Commit

Permalink
⬆️ Upgrade unirest-java to v3.14.1, picocli to v4.7.3, logback-classi…
Browse files Browse the repository at this point in the history
…c to v1.4.7, mongodb-crypt to v1.7.3 + refactor core/pom.xml to move all versions to parent pom
  • Loading branch information
ujibang committed Apr 20, 2023
1 parent 707e123 commit 5b0f74a
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 48 deletions.
8 changes: 1 addition & 7 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mashape.unirest</groupId>
<groupId>com.konghq</groupId>
<artifactId>unirest-java</artifactId>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -467,7 +467,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -515,30 +514,25 @@
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-unixsocket</artifactId>
<version>0.38.17</version> <!-- check version at https://github.com/mongodb/mongo-java-driver/blob/master/build.gradle -->
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-crypt</artifactId>
<version>1.7.1</version> <!-- check version at https://github.com/mongodb/mongo-java-driver/blob/master/build.gradle -->
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>1.1.8.4</version> <!-- check version at https://github.com/mongodb/mongo-java-driver/blob/master/build.gradle -->
</dependency>
<dependency>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>1.5.1-1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.9</version>
<extensions>true</extensions>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
import org.restheart.mongodb.RHMongoClients;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import com.mongodb.ConnectionString;

import kong.unirest.Unirest;
import kong.unirest.UnirestException;

/**
*
* @author Andrea Di Cesare {@literal <andrea@softinstigate.com>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonValue;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonObject;
import com.eclipsesource.json.JsonValue;
import com.mashape.unirest.http.Unirest;
import kong.unirest.Unirest;

import io.undertow.util.Headers;

Expand All @@ -54,7 +54,7 @@ public class DocIdTypeIT extends HttpClientAbstactIT {
private final String DB = TEST_DB_PREFIX + "-id-db";
private final String COLL = "coll";

com.mashape.unirest.http.HttpResponse<String> resp;
kong.unirest.HttpResponse<String> resp;

/**
*
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/java/org/restheart/test/integration/ETagIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;

/**
* @author Andrea Di Cesare {@literal <andrea@softinstigate.com>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonArray;
import com.eclipsesource.json.JsonObject;
import com.mashape.unirest.http.Unirest;
import kong.unirest.Unirest;
import com.mongodb.client.MongoCollection;

/**
Expand Down Expand Up @@ -508,7 +508,7 @@ public void testBinaryProperty() throws Exception {

String url = documentUri.toString();

com.mashape.unirest.http.HttpResponse<String> resp = Unirest.get(url)
kong.unirest.HttpResponse<String> resp = Unirest.get(url)
.basicAuth(ADMIN_ID, ADMIN_PWD)
.asString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import com.eclipsesource.json.JsonArray;
import com.eclipsesource.json.JsonObject;
import com.eclipsesource.json.JsonValue;
import com.mashape.unirest.http.Unirest;
import kong.unirest.Unirest;

/**
*
Expand Down Expand Up @@ -150,7 +150,7 @@ private void testGetIndexes(URI uri) throws Exception {
@SuppressWarnings("rawtypes")
public void createTestData() throws Exception {
// create test db
com.mashape.unirest.http.HttpResponse resp = Unirest.put(url(DB))
kong.unirest.HttpResponse resp = Unirest.put(url(DB))
.basicAuth(ADMIN_ID, ADMIN_PWD)
.asString();

Expand Down Expand Up @@ -210,7 +210,7 @@ public void createTestData() throws Exception {
@Test
@SuppressWarnings("rawtypes")
public void testGetHintStringFormat() throws Exception {
com.mashape.unirest.http.HttpResponse resp = Unirest.get(url(DB, COLL))
kong.unirest.HttpResponse resp = Unirest.get(url(DB, COLL))
.queryString("hint", "a")
.queryString("sort", "{}")
.basicAuth(ADMIN_ID, ADMIN_PWD)
Expand Down Expand Up @@ -292,7 +292,7 @@ public void testGetHintStringFormat() throws Exception {
@Test
@SuppressWarnings("rawtypes")
public void testGetHintObjectFormat() throws Exception {
com.mashape.unirest.http.HttpResponse resp = Unirest.get(url(DB, COLL))
kong.unirest.HttpResponse resp = Unirest.get(url(DB, COLL))
.queryString("hint", "{'a':1}")
.queryString("sort", "{}")
.basicAuth(ADMIN_ID, ADMIN_PWD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonValue;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;
import kong.unirest.UnirestException;

/**
* @author Andrea Di Cesare {@literal <andrea@softinstigate.com>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonObject;
import com.eclipsesource.json.JsonValue;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;

import io.undertow.util.Headers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import org.junit.jupiter.api.Test;
import org.restheart.utils.BsonUtils;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;

/**
* @author Andrea Di Cesare {@literal <andrea@softinstigate.com>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonObject;
import com.eclipsesource.json.JsonValue;
import com.mashape.unirest.http.Unirest;
import kong.unirest.Unirest;

import io.undertow.util.Headers;

Expand All @@ -52,7 +52,7 @@ public class PostCollectionIT extends HttpClientAbstactIT {
private final String COLL = "coll";

@SuppressWarnings("rawtypes")
private com.mashape.unirest.http.HttpResponse resp;
private kong.unirest.HttpResponse resp;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonObject;
import com.eclipsesource.json.JsonValue;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;

import io.undertow.util.Headers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

import com.eclipsesource.json.Json;
import com.eclipsesource.json.JsonValue;
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;

/**
* @author Andrea Di Cesare {@literal <andrea@softinstigate.com>}
Expand Down
4 changes: 2 additions & 2 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
<version>3.21.4</version>
</dependency>
<dependency>
<groupId>com.mashape.unirest</groupId>
<groupId>com.konghq</groupId>
<artifactId>unirest-java</artifactId>
<version>1.4.9</version>
<version>3.14.1</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
Expand Down
4 changes: 2 additions & 2 deletions examples/protobuffer-contacts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mashape.unirest</groupId>
<groupId>com.konghq</groupId>
<artifactId>unirest-java</artifactId>
<scope>test</scope>
<version>3.14.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

import java.io.IOException;
import com.google.protobuf.InvalidProtocolBufferException;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import kong.unirest.Unirest;
import kong.unirest.UnirestException;

public class CreateContact {
public static void main(String[] args) throws Exception {
Expand All @@ -47,12 +47,12 @@ public static void createContact(String name, String email, String phone) throws
var resp = Unirest.post("http://localhost:8080/proto")
.header("Content-Type", "application/protobuf")
.body(body.toByteArray())
.asBinary();
.asBytes();

System.out.println("response status: " + resp.getStatus());

try {
var reply = ContactPostReply.parseFrom(resp.getBody().readAllBytes());
var reply = ContactPostReply.parseFrom(resp.getBody());
System.out.println("id of new contact: " + reply.getId());
} catch(InvalidProtocolBufferException e) {
System.out.println("error parsing response: " + e.getMessage());
Expand Down
39 changes: 34 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,26 @@
<artifactId>mongodb-driver-reactivestreams</artifactId>
<version>4.9.1</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-unixsocket</artifactId>
<version>0.38.17</version> <!-- check version at https://github.com/mongodb/mongo-java-driver/blob/master/build.gradle -->
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-crypt</artifactId>
<version>1.7.3</version> <!-- check version at https://github.com/mongodb/mongo-java-driver/blob/master/build.gradle -->
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>1.1.8.4</version> <!-- check version at https://github.com/mongodb/mongo-java-driver/blob/master/build.gradle -->
</dependency>
<dependency>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>1.5.1-1</version>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
Expand Down Expand Up @@ -269,7 +289,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.6</version>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -309,7 +329,7 @@
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>4.7.2</version>
<version>4.7.3</version>
</dependency>
<dependency>
<groupId>io.github.classgraph</groupId>
Expand Down Expand Up @@ -394,10 +414,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mashape.unirest</groupId>
<groupId>com.konghq</groupId>
<artifactId>unirest-java</artifactId>
<version>1.4.9</version>
<scope>test</scope>
<version>3.14.1</version>
</dependency>
<!-- END Test dependencies -->
</dependencies>
Expand Down Expand Up @@ -518,6 +537,16 @@
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.21</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.5.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down

0 comments on commit 5b0f74a

Please sign in to comment.