From 9aa5cf6f5df29228c76c696189bb988a015dcc8a Mon Sep 17 00:00:00 2001 From: Thomas Bayer Date: Mon, 5 Aug 2024 16:48:15 +0200 Subject: [PATCH] Propagation of exceptions, gpg signing --- .github/workflows/release.yml | 7 +++++++ BUILD.MD | 15 ++++++++++++++- pom.xml | 2 +- .../java/io/membrane_api/jmediator/JMediator.java | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b9b18e..a10bce7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,13 @@ jobs: --no-transfer-progress \ --batch-mode \ -DskipTests + - id: install-secret-key + name: Install gpg secret key + run: | + # Install gpg secret key + cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import + # Verify gpg secret key + gpg --list-secret-keys --keyid-format LONG - id: build-artifact name: Build release artefacts run: | diff --git a/BUILD.MD b/BUILD.MD index faff4e4..fe1c2c8 100644 --- a/BUILD.MD +++ b/BUILD.MD @@ -1,4 +1,17 @@ # New Release - Edit version number in POM -- Run github action `Create Release` manually and specify version as input \ No newline at end of file +- Run github action `Create Release` manually and specify version as input + +## Publish to Maven Central + +Manual process to publish to Maven Central. At the moment publishing using the maven plugin is broken for the new process. + +- Check version number in POM +- export GPG_TTY=$(tty) +- mvn -DskipTests -DcreateChecksum=true install gpg:sign +- Enter PGP Key +- Zip ./m2/repository/io/membrane-api/jmediator-spring-boot-starter +- Login at: https://central.sonatype.com and upload ZIP file + +Todo: - Use maven plugin to publish \ No newline at end of file diff --git a/pom.xml b/pom.xml index d97e215..89c7b54 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.membrane-api jmediator - 0.2.0 + 0.2.1 JMediator Simple mediator implementation for Java. Makes it possible to use the Vertical Slice Architecture with diff --git a/src/main/java/io/membrane_api/jmediator/JMediator.java b/src/main/java/io/membrane_api/jmediator/JMediator.java index 4b9eb4d..34b597a 100644 --- a/src/main/java/io/membrane_api/jmediator/JMediator.java +++ b/src/main/java/io/membrane_api/jmediator/JMediator.java @@ -54,7 +54,7 @@ public T send(IRequest request) throws Throwable { return bam.invoke(request); } catch (ReflectiveOperationException e) { log.error("Cannot call method %s on %s.".formatted(bam.method.getName(), bam.bean.getClass()),e); - throw new RuntimeException("Cannot call method %s on %s.".formatted(bam.method.getName(), bam.bean.getClass())); + throw e.getCause(); } }