From ccf2d8368824913fcfb1c8f4402378e926e3ce7c Mon Sep 17 00:00:00 2001
From: Michael Schnell <1856319+michael-schnell@users.noreply.github.com>
Date: Sun, 31 Dec 2023 14:46:21 +0100
Subject: [PATCH 1/2] Merge develop into master (#24)
---
README.md | 39 +++--
api/pom.xml | 2 +-
esgrpc/pom.xml | 2 +-
.../esgrpc/GrpcProjectionAdminEventStore.java | 151 ++++++++++++++++++
.../GrpcProjectionAdminEventStoreIT.java | 88 ++++++++++
eshttp/pom.xml | 2 +-
.../org/fuin/esc/eshttp/ESHttpEventStore.java | 52 ++----
esjc/pom.xml | 2 +-
jpa/pom.xml | 2 +-
mem/pom.xml | 2 +-
pom.xml | 4 +-
spi/pom.xml | 2 +-
.../esc/spi}/ProjectionJavaScriptBuilder.java | 3 +-
.../spi}/ProjectionJavaScriptBuilderTest.java | 3 +-
test/pom.xml | 2 +-
15 files changed, 291 insertions(+), 65 deletions(-)
create mode 100644 esgrpc/src/main/java/org/fuin/esc/esgrpc/GrpcProjectionAdminEventStore.java
create mode 100644 esgrpc/src/test/java/org/fuin/esc/esgrpc/GrpcProjectionAdminEventStoreIT.java
rename {eshttp/src/main/java/org/fuin/esc/eshttp => spi/src/main/java/org/fuin/esc/spi}/ProjectionJavaScriptBuilder.java (98%)
rename {eshttp/src/test/java/org/fuin/esc/eshttp => spi/src/test/java/org/fuin/esc/spi}/ProjectionJavaScriptBuilderTest.java (98%)
diff --git a/README.md b/README.md
index 9f45906d..afd5f2c7 100644
--- a/README.md
+++ b/README.md
@@ -20,16 +20,23 @@ Defines a common event store Java interface and provides some adapters (like for
## Status
![Warning](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/warning.gif) **This is work in progress** ![Warning](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/warning.gif)
-| Module | Description | Status | Comment |
-|:-------|:------------|--------|:--------|
-| [esc-api](api) | Defines the event store commons API. | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~92% |
-| [esc-http](eshttp) | HTTP adapter for Greg Young's [event store](https://www.geteventstore.com/)| ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~66% |
-| [esc-esjc](esjc) | [Event Store Java Client](https://github.com/msemys/esjc) adapter for Greg Young's [event store](https://www.geteventstore.com/)| ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~80% |
-| [esc-grpc](grpc) | [Event Store DB Client](https://github.com/EventStore/EventStoreDB-Client-Java) adapter for Greg Young's [event store](https://www.geteventstore.com/)| ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~80% |
-| [esc-jpa](jpa) | JPA adapter | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~59% |
-| [esc-mem](mem) | In-memory implementation | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~60% |
-| [esc-spi](spi) | Helper classes for adapters and implementations | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~67% |
-| [esc-test](test) | Cucumber tests for adapters and implementations | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Subscriptions not tested yet |
+| Module | Description | Status | Comment |
+|:------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:-----------------------------|
+| [esc-api](api) | Defines the event store commons API. | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~92% |
+| [esc-http-admin](admin) | HTTP projection admin adapter for Greg Young's [event store](https://www.geteventstore.com/) | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~80% |
+| [esc-grpc](grpc) | [Event Store DB Client](https://github.com/EventStore/EventStoreDB-Client-Java) adapter for Greg Young's [event store](https://www.geteventstore.com/) | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~80% |
+| [esc-jpa](jpa) | JPA adapter | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~59% |
+| [esc-mem](mem) | In-memory implementation | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~60% |
+| [esc-spi](spi) | Helper classes for adapters and implementations | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Test coverage ~67% |
+| [esc-test](test) | Cucumber tests for adapters and implementations | ![OK](https://raw.githubusercontent.com/fuinorg/event-store-commons/master/doc/ok.png) | Subscriptions not tested yet |
+
+Deprecated modules:
+
+| Module | Description | Comment |
+|:-------------------|:-------------------------------------------------------------|:------------------------------------------------------|
+| [esc-http](eshttp) | HTTP adapter for Greg Young's event store | No longer supported by event store (use GRPC instead) |
+| [esc-esjc](esjc) | Event Store Java Client adapter for Greg Young's event store | No longer supported by event store (use GRPC instead) |
+
## Architecture
![Layers](https://raw.github.com/fuinorg/event-store-commons/master/doc/event-store-commons.png)
@@ -42,12 +49,12 @@ Defines a common event store Java interface and provides some adapters (like for
### Major changes
-| Version | Description |
-|:---------------|:-------------------------------------------------------|
-| 0.6.0 | Java 17 / Added new GRPC java client implementation |
-| 0.5.0 | Namespace changed from "javax" to "jakarta" |
-| 0.4.0 | Java 11 |
-| 0.3.1 | Type of the event version changed from `int` to `long` |
+| Version | Description |
+|:--------|:-------------------------------------------------------|
+| 0.6.0 | Java 17 / Added new GRPC java client implementation |
+| 0.5.0 | Namespace changed from "javax" to "jakarta" |
+| 0.4.0 | Java 11 |
+| 0.3.1 | Type of the event version changed from `int` to `long` |
### Snapshots
diff --git a/api/pom.xml b/api/pom.xml
index 6c3b279c..1ea21135 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
esc-api
diff --git a/esgrpc/pom.xml b/esgrpc/pom.xml
index f2705a7e..f7030e24 100644
--- a/esgrpc/pom.xml
+++ b/esgrpc/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
esc-esgrpc
diff --git a/esgrpc/src/main/java/org/fuin/esc/esgrpc/GrpcProjectionAdminEventStore.java b/esgrpc/src/main/java/org/fuin/esc/esgrpc/GrpcProjectionAdminEventStore.java
new file mode 100644
index 00000000..01eb5534
--- /dev/null
+++ b/esgrpc/src/main/java/org/fuin/esc/esgrpc/GrpcProjectionAdminEventStore.java
@@ -0,0 +1,151 @@
+package org.fuin.esc.esgrpc;
+
+import com.eventstore.dbclient.CreateProjectionOptions;
+import com.eventstore.dbclient.DeleteProjectionOptions;
+import com.eventstore.dbclient.EventStoreDBProjectionManagementClient;
+import io.grpc.Status;
+import io.grpc.StatusRuntimeException;
+import jakarta.validation.constraints.NotNull;
+import org.fuin.esc.api.*;
+import org.fuin.esc.spi.ProjectionJavaScriptBuilder;
+import org.fuin.esc.spi.TenantStreamId;
+import org.fuin.objects4j.common.ConstraintViolationException;
+import org.fuin.objects4j.common.Contract;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+
+/**
+ * GRPC based eventstore projection admin implementation.
+ */
+public final class GrpcProjectionAdminEventStore implements ProjectionAdminEventStore {
+
+ private final EventStoreDBProjectionManagementClient es;
+
+ private final TenantId tenantId;
+
+ /**
+ * Constructor with mandatory data.
+ *
+ * @param es Eventstore client to use.
+ */
+ public GrpcProjectionAdminEventStore(EventStoreDBProjectionManagementClient es) {
+ this(es, null);
+ }
+
+ /**
+ * Constructor with all data.
+ *
+ * @param es Eventstore client to use.
+ * @param tenantId Tenant ID or {@literal null}.
+ */
+ public GrpcProjectionAdminEventStore(EventStoreDBProjectionManagementClient es, TenantId tenantId) {
+ Contract.requireArgNotNull("es", es);
+ this.es = es;
+ this.tenantId = tenantId;
+ }
+
+ @Override
+ public ProjectionAdminEventStore open() {
+ // Do nothing
+ return this;
+ }
+
+ @Override
+ public void close() {
+ // Do nothing
+ }
+
+ @Override
+ public boolean projectionExists(StreamId projectionId) {
+ Contract.requireArgNotNull("projectionId", projectionId);
+ requireProjection(projectionId);
+
+ try {
+ es.getStatus(new TenantStreamId(tenantId, projectionId).asString()).get();
+ return true;
+ } catch (final InterruptedException | ExecutionException ex) { // NOSONAR
+ if (ex.getCause() instanceof StatusRuntimeException sre) {
+ if (sre.getStatus().getCode().equals(Status.UNKNOWN.getCode())
+ && sre.getMessage() != null && sre.getMessage().contains("NotFound")) {
+ return false;
+ }
+ }
+ throw new RuntimeException("Error waiting for getStatus(..) result", ex);
+ }
+
+ }
+
+ @Override
+ public void enableProjection(StreamId projectionId) throws StreamNotFoundException {
+ Contract.requireArgNotNull("projectionId", projectionId);
+ requireProjection(projectionId);
+
+ try {
+ es.enable(new TenantStreamId(tenantId, projectionId).asString()).get();
+ } catch (final InterruptedException | ExecutionException ex) { // NOSONAR
+ throw new RuntimeException("Error waiting for enable(..) result", ex);
+ }
+ }
+
+ @Override
+ public void disableProjection(StreamId projectionId) throws StreamNotFoundException {
+ Contract.requireArgNotNull("projectionId", projectionId);
+ requireProjection(projectionId);
+
+ try {
+ es.disable(new TenantStreamId(tenantId, projectionId).asString()).get();
+ } catch (final InterruptedException | ExecutionException ex) { // NOSONAR
+ throw new RuntimeException("Error waiting for disable(..) result", ex);
+ }
+ }
+
+ @Override
+ public void createProjection(StreamId projectionId, boolean enable, @NotNull TypeName... eventType) throws StreamAlreadyExistsException {
+ createProjection(projectionId, enable, Arrays.asList(eventType));
+ }
+
+ @Override
+ public void createProjection(StreamId projectionId, boolean enable, List eventTypes) throws StreamAlreadyExistsException {
+ Contract.requireArgNotNull("projectionId", projectionId);
+ requireProjection(projectionId);
+
+ final TenantStreamId pid = new TenantStreamId(tenantId, projectionId);
+ final String javascript = new ProjectionJavaScriptBuilder(pid).types(eventTypes).build();
+ try {
+ es.create(pid.asString(), javascript, CreateProjectionOptions.get().emitEnabled(false).trackEmittedStreams(true)).get();
+ } catch (final InterruptedException | ExecutionException ex) { // NOSONAR
+ throw new RuntimeException("Error waiting for create(..) result", ex);
+ }
+ if (enable) {
+ enableProjection(pid);
+ } else {
+ // Workaround for https://github.com/EventStore/EventStoreDB-Client-Java/issues/259 (not a perfect one...)
+ disableProjection(pid);
+ }
+ }
+
+ @Override
+ public void deleteProjection(StreamId projectionId) throws StreamNotFoundException {
+ Contract.requireArgNotNull("projectionId", projectionId);
+ requireProjection(projectionId);
+
+ disableProjection(projectionId);
+
+ final TenantStreamId pid = new TenantStreamId(tenantId, projectionId);
+ try {
+ es.delete(pid.asString(), DeleteProjectionOptions.get().deleteCheckpointStream().deleteStateStream().deleteEmittedStreams()).get();
+ } catch (final InterruptedException | ExecutionException ex) { // NOSONAR
+ throw new RuntimeException("Error waiting for delete(..) result", ex);
+ }
+
+ }
+
+ static void requireProjection(final StreamId projectionId) {
+ if (!projectionId.isProjection()) {
+ throw new ConstraintViolationException("The stream identifier is not a projection id");
+ }
+ }
+
+}
diff --git a/esgrpc/src/test/java/org/fuin/esc/esgrpc/GrpcProjectionAdminEventStoreIT.java b/esgrpc/src/test/java/org/fuin/esc/esgrpc/GrpcProjectionAdminEventStoreIT.java
new file mode 100644
index 00000000..9e233b48
--- /dev/null
+++ b/esgrpc/src/test/java/org/fuin/esc/esgrpc/GrpcProjectionAdminEventStoreIT.java
@@ -0,0 +1,88 @@
+package org.fuin.esc.esgrpc;
+
+import com.eventstore.dbclient.EventStoreDBClientSettings;
+import com.eventstore.dbclient.EventStoreDBConnectionString;
+import com.eventstore.dbclient.EventStoreDBProjectionManagementClient;
+import org.fuin.esc.api.ProjectionStreamId;
+import org.fuin.esc.api.TypeName;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.net.MalformedURLException;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Tests the {@link GrpcProjectionAdminEventStore} class.
+ */
+class GrpcProjectionAdminEventStoreIT {
+
+ private static EventStoreDBProjectionManagementClient client;
+
+ private GrpcProjectionAdminEventStore testee;
+
+ @BeforeAll
+ static void beforeAll() {
+ final EventStoreDBClientSettings setts = EventStoreDBConnectionString
+ .parseOrThrow("esdb://localhost:2113?tls=false");
+ client = EventStoreDBProjectionManagementClient.create(setts);
+ }
+
+ @BeforeEach
+ void beforeEach() throws MalformedURLException {
+ testee = new GrpcProjectionAdminEventStore(client, null);
+ }
+
+ @Test
+ void testProjectionNotExists() {
+ assertThat(testee.projectionExists(new ProjectionStreamId("grpc-test-not-existing"))).isFalse();
+ }
+
+ @Test
+ void testEnableDisableProjection() {
+
+ // GIVEN
+ final ProjectionStreamId projectionId = new ProjectionStreamId("grpc-test-disabled");
+ testee.createProjection(projectionId, false, new TypeName("one"), new TypeName("two"));
+
+ // WHEN
+ testee.enableProjection(projectionId);
+
+ // THEN
+ // TODO assertThat(testee.projectionEnabled()).isTrue();
+
+ }
+
+ @Test
+ void testCreateAndExistsProjection() {
+
+ // GIVEN
+ final ProjectionStreamId projectionId = new ProjectionStreamId("grpc-test-create");
+ assertThat(testee.projectionExists(projectionId)).isFalse();
+
+ // WHEN
+ testee.createProjection(projectionId, true, new TypeName("one"), new TypeName("two"));
+
+ // THEN
+ assertThat(testee.projectionExists(projectionId)).isTrue();
+
+ }
+
+ @Test
+ void testDeleteProjection() {
+
+ // GIVEN
+ final ProjectionStreamId projectionId = new ProjectionStreamId("grpc-test-delete");
+ testee.createProjection(projectionId, false, new TypeName("one"), new TypeName("two"));
+ assertThat(testee.projectionExists(projectionId)).isTrue();
+
+ // WHEN
+ testee.deleteProjection(projectionId);
+
+ // THEN
+ assertThat(testee.projectionExists(projectionId)).isFalse();
+
+ }
+
+}
diff --git a/eshttp/pom.xml b/eshttp/pom.xml
index b7e2868f..07dc7354 100644
--- a/eshttp/pom.xml
+++ b/eshttp/pom.xml
@@ -6,7 +6,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
esc-eshttp
diff --git a/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpEventStore.java b/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpEventStore.java
index d4c749aa..8f720f85 100644
--- a/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpEventStore.java
+++ b/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpEventStore.java
@@ -17,22 +17,7 @@
*/
package org.fuin.esc.eshttp;
-import static org.fuin.esc.api.ExpectedVersion.ANY;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.ThreadFactory;
-
import jakarta.validation.constraints.NotNull;
-
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
@@ -52,32 +37,27 @@
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.apache.http.impl.nio.client.HttpAsyncClients;
import org.apache.http.util.EntityUtils;
-import org.fuin.esc.api.CommonEvent;
-import org.fuin.esc.api.EventNotFoundException;
-import org.fuin.esc.api.ExpectedVersion;
-import org.fuin.esc.api.SimpleStreamId;
-import org.fuin.esc.api.StreamAlreadyExistsException;
-import org.fuin.esc.api.StreamDeletedException;
-import org.fuin.esc.api.StreamEventsSlice;
-import org.fuin.esc.api.StreamId;
-import org.fuin.esc.api.StreamNotFoundException;
-import org.fuin.esc.api.StreamReadOnlyException;
-import org.fuin.esc.api.StreamState;
-import org.fuin.esc.api.TenantId;
-import org.fuin.esc.api.TypeName;
-import org.fuin.esc.api.WrongExpectedVersionException;
-import org.fuin.esc.spi.AbstractReadableEventStore;
-import org.fuin.esc.spi.DeserializerRegistry;
-import org.fuin.esc.spi.EnhancedMimeType;
-import org.fuin.esc.spi.EscSpiUtils;
-import org.fuin.esc.spi.SerDeserializerRegistry;
-import org.fuin.esc.spi.SerializerRegistry;
-import org.fuin.esc.spi.TenantStreamId;
+import org.fuin.esc.api.*;
+import org.fuin.esc.spi.*;
import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.ThreadFactory;
+
+import static org.fuin.esc.api.ExpectedVersion.ANY;
+
/**
* Implementation that connects to the http://www.geteventstore.com via HTTP API.
*/
diff --git a/esjc/pom.xml b/esjc/pom.xml
index 58533e15..04631aa6 100644
--- a/esjc/pom.xml
+++ b/esjc/pom.xml
@@ -6,7 +6,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
esc-esjc
diff --git a/jpa/pom.xml b/jpa/pom.xml
index 68aebfff..aa2e40e6 100644
--- a/jpa/pom.xml
+++ b/jpa/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
esc-jpa
diff --git a/mem/pom.xml b/mem/pom.xml
index b7ed80dd..c7ff946c 100644
--- a/mem/pom.xml
+++ b/mem/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
esc-mem
diff --git a/pom.xml b/pom.xml
index 81f29b2f..9c714a3a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
pom
esc-parent
Defines a common event store Java interface and provides some adapters (like for Greg Young's event store) and implementations (like in-memory or file-based).
@@ -189,7 +189,7 @@
net.javacrumbs.json-unit
json-unit-fluent
- 2.38.0
+ 3.0.0
diff --git a/spi/pom.xml b/spi/pom.xml
index 0a29949d..075867d3 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
esc-spi
diff --git a/eshttp/src/main/java/org/fuin/esc/eshttp/ProjectionJavaScriptBuilder.java b/spi/src/main/java/org/fuin/esc/spi/ProjectionJavaScriptBuilder.java
similarity index 98%
rename from eshttp/src/main/java/org/fuin/esc/eshttp/ProjectionJavaScriptBuilder.java
rename to spi/src/main/java/org/fuin/esc/spi/ProjectionJavaScriptBuilder.java
index 7f5ef8e6..a00889e7 100644
--- a/eshttp/src/main/java/org/fuin/esc/eshttp/ProjectionJavaScriptBuilder.java
+++ b/spi/src/main/java/org/fuin/esc/spi/ProjectionJavaScriptBuilder.java
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see http://www.gnu.org/licenses/.
*/
-package org.fuin.esc.eshttp;
+package org.fuin.esc.spi;
import java.util.List;
@@ -23,7 +23,6 @@
import org.fuin.esc.api.StreamId;
import org.fuin.esc.api.TypeName;
-import org.fuin.esc.spi.TenantStreamId;
import org.fuin.objects4j.common.Contract;
/**
diff --git a/eshttp/src/test/java/org/fuin/esc/eshttp/ProjectionJavaScriptBuilderTest.java b/spi/src/test/java/org/fuin/esc/spi/ProjectionJavaScriptBuilderTest.java
similarity index 98%
rename from eshttp/src/test/java/org/fuin/esc/eshttp/ProjectionJavaScriptBuilderTest.java
rename to spi/src/test/java/org/fuin/esc/spi/ProjectionJavaScriptBuilderTest.java
index 51e4554d..83d7865a 100644
--- a/eshttp/src/test/java/org/fuin/esc/eshttp/ProjectionJavaScriptBuilderTest.java
+++ b/spi/src/test/java/org/fuin/esc/spi/ProjectionJavaScriptBuilderTest.java
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see http://www.gnu.org/licenses/.
*/
-package org.fuin.esc.eshttp;
+package org.fuin.esc.spi;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.fail;
@@ -25,6 +25,7 @@
import org.fuin.esc.api.SimpleStreamId;
import org.fuin.esc.api.TypeName;
+import org.fuin.esc.spi.ProjectionJavaScriptBuilder;
import org.junit.jupiter.api.Test;
/**
diff --git a/test/pom.xml b/test/pom.xml
index e804e7dd..308acd73 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -6,7 +6,7 @@
org.fuin.esc
esc-parent
- 0.6.0
+ 0.7.0-SNAPSHOT
esc-test
From 31fb1d786be6d66f27a5ffeb952f5a56a8eddc6b Mon Sep 17 00:00:00 2001
From: Michael Schnell
Date: Sun, 31 Dec 2023 14:50:12 +0100
Subject: [PATCH 2/2] Release 0.7.0
---
README.md | 14 +++-----------
api/pom.xml | 2 +-
esgrpc/pom.xml | 2 +-
eshttp/pom.xml | 2 +-
esjc/pom.xml | 2 +-
jpa/pom.xml | 2 +-
mem/pom.xml | 2 +-
pom.xml | 2 +-
spi/pom.xml | 2 +-
test/pom.xml | 2 +-
10 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
index afd5f2c7..4b220e71 100644
--- a/README.md
+++ b/README.md
@@ -8,8 +8,9 @@ Defines a common event store Java interface and provides some adapters (like for
[![Java Development Kit 17](https://img.shields.io/badge/JDK-17-green.svg)](https://openjdk.java.net/projects/jdk/17/)
## Versions
-- 0.6.x (or later) = **Java 17**
-- 0.5.0 = **Java 11** with new **jakarta** namespace
+- 0.7.x = New **GRPC** client / Removed **http**/**esjc** modules
+- 0.6.x = **Java 17** and JUnit5
+- 0.5.x = **Java 11** with new **jakarta** namespace
- 0.4.x = **Java 11** before namespace change from 'javax' to 'jakarta'
- 0.3.2 (or less) = **Java 8**
@@ -47,15 +48,6 @@ Deprecated modules:
- [Event store with HTTP interface and JSON (JSON-B)](test/src/test/java/org/fuin/esc/test/examples/EsHttpJsonbExample.java)
- [Event store with HTTP interface and mixed JSON/XML content (JAX-B/JSON-B)](test/src/test/java/org/fuin/esc/test/examples/EsHttpMixedExample.java)
-### Major changes
-
-| Version | Description |
-|:--------|:-------------------------------------------------------|
-| 0.6.0 | Java 17 / Added new GRPC java client implementation |
-| 0.5.0 | Namespace changed from "javax" to "jakarta" |
-| 0.4.0 | Java 11 |
-| 0.3.1 | Type of the event version changed from `int` to `long` |
-
### Snapshots
Snapshots can be found on the [OSS Sonatype Snapshots Repository](https://oss.sonatype.org/content/repositories/snapshots/org/fuin/esc/ "Snapshot Repository").
diff --git a/api/pom.xml b/api/pom.xml
index 1ea21135..7193741f 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
esc-api
diff --git a/esgrpc/pom.xml b/esgrpc/pom.xml
index f7030e24..ec871c39 100644
--- a/esgrpc/pom.xml
+++ b/esgrpc/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
esc-esgrpc
diff --git a/eshttp/pom.xml b/eshttp/pom.xml
index 07dc7354..8ee384e4 100644
--- a/eshttp/pom.xml
+++ b/eshttp/pom.xml
@@ -6,7 +6,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
esc-eshttp
diff --git a/esjc/pom.xml b/esjc/pom.xml
index 04631aa6..986930b0 100644
--- a/esjc/pom.xml
+++ b/esjc/pom.xml
@@ -6,7 +6,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
esc-esjc
diff --git a/jpa/pom.xml b/jpa/pom.xml
index aa2e40e6..a55b9eb8 100644
--- a/jpa/pom.xml
+++ b/jpa/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
esc-jpa
diff --git a/mem/pom.xml b/mem/pom.xml
index c7ff946c..f04d9826 100644
--- a/mem/pom.xml
+++ b/mem/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
esc-mem
diff --git a/pom.xml b/pom.xml
index 9c714a3a..befbddc6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
pom
esc-parent
Defines a common event store Java interface and provides some adapters (like for Greg Young's event store) and implementations (like in-memory or file-based).
diff --git a/spi/pom.xml b/spi/pom.xml
index 075867d3..f3d1f93d 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -8,7 +8,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
esc-spi
diff --git a/test/pom.xml b/test/pom.xml
index 308acd73..f98efe87 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -6,7 +6,7 @@
org.fuin.esc
esc-parent
- 0.7.0-SNAPSHOT
+ 0.7.0
esc-test