You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by bc...@apache.org on 2023/05/06 09:49:54 UTC

[incubator-baremaps] branch 632-ogc-api-feature updated (ceee7524 -> 96edc823)

This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a change to branch 632-ogc-api-feature
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git


    omit ceee7524 Remove dependency to JDBI
     new 96edc823 Remove dependency to JDBI

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ceee7524)
            \
             N -- N -- N   refs/heads/632-ogc-api-feature (96edc823)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/test/java/org/apache/baremaps/ogcapi/TilesResourceTest.java      | 1 -
 1 file changed, 1 deletion(-)


[incubator-baremaps] 01/01: Remove dependency to JDBI

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch 632-ogc-api-feature
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git

commit 96edc823e94736132bdab3599eee2bccc5e02d90
Author: Bertil Chapuis <bc...@gmail.com>
AuthorDate: Fri May 5 16:06:41 2023 +0200

    Remove dependency to JDBI
---
 baremaps-ogcapi/pom.xml                            | 16 ----------------
 .../org/apache/baremaps/ogcapi/OgcApiTest.java     | 22 +++++++---------------
 .../apache/baremaps/ogcapi/TilesResourceTest.java  |  1 -
 pom.xml                                            |  8 --------
 4 files changed, 7 insertions(+), 40 deletions(-)

diff --git a/baremaps-ogcapi/pom.xml b/baremaps-ogcapi/pom.xml
index 1c9f8677..8b878eec 100644
--- a/baremaps-ogcapi/pom.xml
+++ b/baremaps-ogcapi/pom.xml
@@ -102,22 +102,6 @@
       <groupId>org.graalvm.js</groupId>
       <artifactId>js-scriptengine</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.jdbi</groupId>
-      <artifactId>jdbi3-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jdbi</groupId>
-      <artifactId>jdbi3-jackson2</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jdbi</groupId>
-      <artifactId>jdbi3-postgis</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jdbi</groupId>
-      <artifactId>jdbi3-postgres</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.junit.vintage</groupId>
       <artifactId>junit-vintage-engine</artifactId>
diff --git a/baremaps-ogcapi/src/test/java/org/apache/baremaps/ogcapi/OgcApiTest.java b/baremaps-ogcapi/src/test/java/org/apache/baremaps/ogcapi/OgcApiTest.java
index 2df2c1fa..7837fd89 100644
--- a/baremaps-ogcapi/src/test/java/org/apache/baremaps/ogcapi/OgcApiTest.java
+++ b/baremaps-ogcapi/src/test/java/org/apache/baremaps/ogcapi/OgcApiTest.java
@@ -20,7 +20,6 @@ import java.io.IOException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import javax.sql.DataSource;
-import org.apache.baremaps.config.ConfigReader;
 import org.apache.baremaps.database.PostgresUtils;
 import org.apache.baremaps.database.tile.PostgresTileStore;
 import org.apache.baremaps.database.tile.TileStore;
@@ -31,9 +30,6 @@ import org.glassfish.jersey.media.multipart.MultiPartFeature;
 import org.glassfish.jersey.server.ResourceConfig;
 import org.glassfish.jersey.test.JerseyTest;
 import org.glassfish.jersey.test.TestProperties;
-import org.jdbi.v3.core.Jdbi;
-import org.jdbi.v3.jackson2.Jackson2Plugin;
-import org.jdbi.v3.postgis.PostgisPlugin;
 import org.junit.jupiter.api.Tag;
 
 @Tag("integration")
@@ -41,24 +37,20 @@ public abstract class OgcApiTest extends JerseyTest {
 
   private DataSource dataSource;
 
-  private Jdbi jdbi;
-
   @Override
   protected ResourceConfig configure() {
     // Create a datasource to a throwaway postgis database
     dataSource = PostgresUtils.dataSource("jdbc:tc:postgis:13-3.1:///baremaps");
 
-    // Configure JDBI
-    jdbi = Jdbi.create(dataSource)
-        .installPlugin(new Jackson2Plugin())
-        .installPlugin(new PostgisPlugin());
-
     // Initialize the database
-    jdbi.useHandle(handle -> {
-      handle.execute("create extension if not exists hstore");
-      handle.execute(
+    try (var connection = dataSource.getConnection()) {
+      connection.createStatement().execute("create extension if not exists postgis");
+      connection.createStatement().execute("create extension if not exists hstore");
+      connection.createStatement().execute(
           "create table if not exists features (id integer primary key, property varchar, geometry geometry(Point, 4326))");
-    });
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
 
     // Configure the service
     enable(TestProperties.LOG_TRAFFIC);
diff --git a/baremaps-ogcapi/src/test/java/org/apache/baremaps/ogcapi/TilesResourceTest.java b/baremaps-ogcapi/src/test/java/org/apache/baremaps/ogcapi/TilesResourceTest.java
index de8996d7..d2700bc7 100644
--- a/baremaps-ogcapi/src/test/java/org/apache/baremaps/ogcapi/TilesResourceTest.java
+++ b/baremaps-ogcapi/src/test/java/org/apache/baremaps/ogcapi/TilesResourceTest.java
@@ -14,7 +14,6 @@ package org.apache.baremaps.ogcapi;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.junit.jupiter.api.Assertions.*;
 
 import javax.ws.rs.core.MediaType;
 import org.junit.jupiter.api.Test;
diff --git a/pom.xml b/pom.xml
index f16f3634..da2607ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,6 @@
     <version.lib.jackson>2.13.0</version.lib.jackson>
     <version.lib.jakarta>2.1.6</version.lib.jakarta>
     <version.lib.jaxb-runtime>2.3.5</version.lib.jaxb-runtime>
-    <version.lib.jdbi>3.37.1</version.lib.jdbi>
     <version.lib.jersey>2.35</version.lib.jersey>
     <version.lib.jmh>1.35</version.lib.jmh>
     <version.lib.jsqlparser>4.2</version.lib.jsqlparser>
@@ -394,13 +393,6 @@
         <artifactId>graal-sdk</artifactId>
         <version>${version.lib.graalvm}</version>
       </dependency>
-      <dependency>
-        <groupId>org.jdbi</groupId>
-        <artifactId>jdbi3-bom</artifactId>
-        <version>${version.lib.jdbi}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
       <dependency>
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter-api</artifactId>