From 55611dbb70bd71a4602079b0d30af65e4a5d5fc2 Mon Sep 17 00:00:00 2001 From: Jesper Berggren Date: Mon, 15 Apr 2024 15:07:01 +0200 Subject: [PATCH 1/7] Updated all dependencies to newest versions to help fix numerous vulnerabilities --- pom.xml | 86 +++++++++++-------- .../redis/embedded/AbstractRedisInstance.java | 6 +- .../java/redis/embedded/util/JarUtil.java | 4 +- .../java/redis/embedded/RedisClusterTest.java | 10 ++- .../redis/embedded/RedisSentinelTest.java | 9 +- .../embedded/RedisServerClusterTest.java | 12 +-- .../java/redis/embedded/RedisServerTest.java | 50 ++++++----- .../embedded/SpringDataConnectivityTest.java | 66 ++++++++------ .../ports/EphemeralPortProviderTest.java | 7 +- .../ports/PredefinedPortProviderTest.java | 29 ++++--- .../ports/SequencePortProviderTest.java | 4 +- 11 files changed, 167 insertions(+), 116 deletions(-) diff --git a/pom.xml b/pom.xml index d6d30e0c..992c9118 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ it.ozimov embedded-redis jar - 0.7.4-SNAPSHOT + 0.8.0-SNAPSHOT embedded-redis Redis embedded server for Java integration testing. Project forked from https://github.com/kstyrc/embedded-redis @@ -40,62 +40,57 @@ com.google.guava guava - 21.0 + 33.1.0-jre commons-io commons-io - 2.5 + 2.16.1 org.slf4j slf4j-simple - 1.7.21 + 2.0.13 - + redis.clients jedis - 2.8.2 - + 5.1.2 test org.mockito - mockito-all - 1.10.19 + mockito-core + 5.11.0 test - junit - junit - 4.12 + org.junit.jupiter + junit-jupiter-api + 5.10.2 test org.springframework.data spring-data-redis - 1.8.0.RELEASE + 3.2.5 test - - 3.0.4 - - ossrh @@ -120,12 +115,12 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.2.5 org.jacoco jacoco-maven-plugin - 0.7.9 + 0.8.12 default-prepare-agent @@ -155,7 +150,7 @@ org.codehaus.mojo versions-maven-plugin - 2.3 + 2.16.2 false @@ -163,7 +158,7 @@ org.apache.maven.plugins maven-scm-plugin - 1.9.5 + 2.0.1 false ${project.version} @@ -172,28 +167,51 @@ org.apache.maven.plugins maven-compiler-plugin + 3.13.0 - 8 - 8 + 17 + 17 + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-maven + + enforce + + + + + 3.0.4 + + + + + + - disable-java8-doclint + disable-java17-doclint - [1.8,) + [17,) org.apache.maven.plugins maven-javadoc-plugin - 2.10.4 + 3.6.3 - -Xdoclint:none + none @@ -206,7 +224,7 @@ org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.3.1 attach-sources @@ -219,7 +237,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.10.3 + 3.6.3 attach-javadocs @@ -232,7 +250,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.2.3 sign-artifacts @@ -246,7 +264,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 + 1.6.13 true ossrh @@ -264,7 +282,7 @@ org.codehaus.mojo versions-maven-plugin - 2.3 + 2.16.2 diff --git a/src/main/java/redis/embedded/AbstractRedisInstance.java b/src/main/java/redis/embedded/AbstractRedisInstance.java index 2e3c9ba7..b7a83ef0 100644 --- a/src/main/java/redis/embedded/AbstractRedisInstance.java +++ b/src/main/java/redis/embedded/AbstractRedisInstance.java @@ -1,8 +1,8 @@ package redis.embedded; import org.apache.commons.io.IOUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import redis.embedded.exceptions.EmbeddedRedisException; import java.io.*; @@ -14,7 +14,7 @@ abstract class AbstractRedisInstance implements Redis { - private static Log log = LogFactory.getLog(AbstractRedisInstance.class); + private static Logger log = LoggerFactory.getLogger(AbstractRedisInstance.class); protected List args = Collections.emptyList(); private volatile boolean active = false; diff --git a/src/main/java/redis/embedded/util/JarUtil.java b/src/main/java/redis/embedded/util/JarUtil.java index bd709d7f..f91d12a6 100644 --- a/src/main/java/redis/embedded/util/JarUtil.java +++ b/src/main/java/redis/embedded/util/JarUtil.java @@ -1,16 +1,16 @@ package redis.embedded.util; -import com.google.common.io.Files; import com.google.common.io.Resources; import org.apache.commons.io.FileUtils; import java.io.File; import java.io.IOException; +import java.nio.file.Files; public class JarUtil { public static File extractExecutableFromJar(String executable) throws IOException { - File tmpDir = Files.createTempDir(); + File tmpDir = Files.createTempDirectory("").toFile(); tmpDir.deleteOnExit(); File command = new File(tmpDir, executable); diff --git a/src/test/java/redis/embedded/RedisClusterTest.java b/src/test/java/redis/embedded/RedisClusterTest.java index 41bb8d8c..63e4f66b 100644 --- a/src/test/java/redis/embedded/RedisClusterTest.java +++ b/src/test/java/redis/embedded/RedisClusterTest.java @@ -1,8 +1,9 @@ package redis.embedded; import com.google.common.collect.Sets; -import org.junit.Before; -import org.junit.Test; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisSentinelPool; import redis.embedded.util.JedisUtil; @@ -11,7 +12,8 @@ import java.util.List; import java.util.Set; -import static org.junit.Assert.assertEquals; + +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; @@ -24,7 +26,7 @@ public class RedisClusterTest { private RedisCluster instance; - @Before + @BeforeAll public void setUp() throws Exception { sentinel1 = mock(Redis.class); sentinel2 = mock(Redis.class); diff --git a/src/test/java/redis/embedded/RedisSentinelTest.java b/src/test/java/redis/embedded/RedisSentinelTest.java index 29bfe0de..9705e7af 100644 --- a/src/test/java/redis/embedded/RedisSentinelTest.java +++ b/src/test/java/redis/embedded/RedisSentinelTest.java @@ -1,7 +1,8 @@ package redis.embedded; import com.google.common.collect.Sets; -import org.junit.Test; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisSentinelPool; @@ -10,13 +11,15 @@ import java.io.InputStreamReader; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; + public class RedisSentinelTest { private RedisSentinel sentinel; private RedisServer server; - @Test(timeout = 3000L) + @Test + @Timeout(value = 3000, unit = TimeUnit.MILLISECONDS) public void testSimpleRun() throws Exception { server = new RedisServer(); sentinel = RedisSentinel.builder().build(); diff --git a/src/test/java/redis/embedded/RedisServerClusterTest.java b/src/test/java/redis/embedded/RedisServerClusterTest.java index 2db77240..f55afa96 100644 --- a/src/test/java/redis/embedded/RedisServerClusterTest.java +++ b/src/test/java/redis/embedded/RedisServerClusterTest.java @@ -1,19 +1,19 @@ package redis.embedded; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class RedisServerClusterTest { private RedisServer redisServer1; private RedisServer redisServer2; - @Before + @BeforeAll public void setUp() throws Exception { redisServer1 = RedisServer.builder() .port(6300) @@ -47,7 +47,7 @@ public void testSimpleOperationsAfterRun() throws Exception { } - @After + @AfterAll public void tearDown() throws Exception { redisServer1.stop(); redisServer2.stop(); diff --git a/src/test/java/redis/embedded/RedisServerTest.java b/src/test/java/redis/embedded/RedisServerTest.java index 5effda49..424df517 100644 --- a/src/test/java/redis/embedded/RedisServerTest.java +++ b/src/test/java/redis/embedded/RedisServerTest.java @@ -1,7 +1,8 @@ package redis.embedded; import com.google.common.io.Resources; -import org.junit.Test; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import redis.embedded.exceptions.RedisBuildingException; @@ -11,14 +12,17 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; +import java.util.concurrent.TimeUnit; + +import static org.junit.jupiter.api.Assertions.*; -import static org.junit.Assert.*; public class RedisServerTest { private RedisServer redisServer; - @Test(timeout = 1500L) + @Test + @Timeout(value = 1500, unit = TimeUnit.MILLISECONDS) public void testSimpleRun() throws Exception { redisServer = new RedisServer(6379); redisServer.start(); @@ -26,15 +30,17 @@ public void testSimpleRun() throws Exception { redisServer.stop(); } - @Test(expected = RuntimeException.class) + @Test public void shouldNotAllowMultipleRunsWithoutStop() throws Exception { - try { - redisServer = new RedisServer(6379); - redisServer.start(); - redisServer.start(); - } finally { - redisServer.stop(); - } + assertThrows(RuntimeException.class, () -> { + try { + redisServer = new RedisServer(6379); + redisServer.start(); + redisServer.start(); + } finally { + redisServer.stop(); + } + }); } @Test @@ -108,17 +114,19 @@ public void shouldOverrideDefaultExecutable() throws Exception { .build(); } - @Test(expected = RedisBuildingException.class) + @Test public void shouldFailWhenBadExecutableGiven() throws Exception { - RedisExecProvider buggyProvider = RedisExecProvider.defaultProvider() - .override(OS.UNIX, "some") - .override(OS.WINDOWS, Architecture.x86, "some") - .override(OS.WINDOWS, Architecture.x86_64, "some") - .override(OS.MAC_OS_X, "some"); - - redisServer = new RedisServerBuilder() - .redisExecProvider(buggyProvider) - .build(); + assertThrows(RedisBuildingException.class, () -> { + RedisExecProvider buggyProvider = RedisExecProvider.defaultProvider() + .override(OS.UNIX, "some") + .override(OS.WINDOWS, Architecture.x86, "some") + .override(OS.WINDOWS, Architecture.x86_64, "some") + .override(OS.MAC_OS_X, "some"); + + redisServer = new RedisServerBuilder() + .redisExecProvider(buggyProvider) + .build(); + }); } @Test diff --git a/src/test/java/redis/embedded/SpringDataConnectivityTest.java b/src/test/java/redis/embedded/SpringDataConnectivityTest.java index 86eb40b9..cb5438fd 100644 --- a/src/test/java/redis/embedded/SpringDataConnectivityTest.java +++ b/src/test/java/redis/embedded/SpringDataConnectivityTest.java @@ -1,49 +1,61 @@ package redis.embedded; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.core.StringRedisTemplate; -import redis.clients.jedis.JedisShardInfo; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import redis.clients.jedis.Connection; +import redis.clients.jedis.exceptions.JedisConnectionException; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; public class SpringDataConnectivityTest { private RedisServer redisServer; - private RedisTemplate template; - private JedisConnectionFactory connectionFactory; + private Connection client; - @Before + @BeforeAll public void setUp() throws Exception { redisServer = new RedisServer(6379); redisServer.start(); + } - JedisShardInfo shardInfo = new JedisShardInfo("localhost", 6379); - connectionFactory = new JedisConnectionFactory(); - connectionFactory.setShardInfo(shardInfo); - - template = new StringRedisTemplate(); - template.setConnectionFactory(connectionFactory); - template.afterPropertiesSet(); + @Test + public void checkUnknownHost() { + assertThrows(JedisConnectionException.class, () -> { + this.client = new Connection("someunknownhost", 6379); + this.client.connect(); + }); } @Test - public void shouldBeAbleToUseSpringData() throws Exception { - // given - template.opsForValue().set("foo", "bar"); + public void checkWrongPort() { + assertThrows(JedisConnectionException.class, () -> { + this.client = new Connection("127.0.0.1", 55665); + this.client.connect(); + }); + } - // when - String result = template.opsForValue().get("foo"); + @Test + public void connectIfNotConnectedWhenSettingTimeoutInfinite() { + this.client = new Connection("localhost", 6379); + this.client.setTimeoutInfinite(); + } - // then - assertEquals("bar", result); + @Test + public void checkCloseable() { + this.client = new Connection("localhost", 6379); + this.client.connect(); + this.client.close(); } - @After + @AfterAll public void tearDown() throws Exception { - redisServer.stop(); + if (this.client != null) { + this.client.close(); + } + + if (this.redisServer != null) { + this.redisServer.stop(); + } } } diff --git a/src/test/java/redis/embedded/ports/EphemeralPortProviderTest.java b/src/test/java/redis/embedded/ports/EphemeralPortProviderTest.java index fece5770..4615bdc1 100644 --- a/src/test/java/redis/embedded/ports/EphemeralPortProviderTest.java +++ b/src/test/java/redis/embedded/ports/EphemeralPortProviderTest.java @@ -1,11 +1,14 @@ package redis.embedded.ports; -import org.junit.Test; + + +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; + public class EphemeralPortProviderTest { diff --git a/src/test/java/redis/embedded/ports/PredefinedPortProviderTest.java b/src/test/java/redis/embedded/ports/PredefinedPortProviderTest.java index 50048894..f63e32b4 100644 --- a/src/test/java/redis/embedded/ports/PredefinedPortProviderTest.java +++ b/src/test/java/redis/embedded/ports/PredefinedPortProviderTest.java @@ -1,6 +1,7 @@ package redis.embedded.ports; -import org.junit.Test; + +import org.junit.jupiter.api.Test; import redis.embedded.exceptions.RedisBuildingException; import java.util.ArrayList; @@ -8,7 +9,9 @@ import java.util.Collection; import java.util.List; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + public class PredefinedPortProviderTest { @@ -28,18 +31,20 @@ public void nextShouldGiveNextPortFromAssignedList() throws Exception { assertEquals(ports, returnedPorts); } - @Test(expected = RedisBuildingException.class) + @Test public void nextShouldThrowExceptionWhenRunOutsOfPorts() throws Exception { - //given - Collection ports = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - final PredefinedPortProvider provider = new PredefinedPortProvider(ports); + assertThrows(RedisBuildingException.class, () -> { + //given + Collection ports = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); + final PredefinedPortProvider provider = new PredefinedPortProvider(ports); - //when - for(int i = 0;i < ports.size(); i++) { - provider.next(); - } + //when + for (int i = 0; i < ports.size(); i++) { + provider.next(); + } - //then exception should be thrown... - provider.next(); + //then exception should be thrown... + provider.next(); + }); } } \ No newline at end of file diff --git a/src/test/java/redis/embedded/ports/SequencePortProviderTest.java b/src/test/java/redis/embedded/ports/SequencePortProviderTest.java index 0a74b20c..ecc8b859 100644 --- a/src/test/java/redis/embedded/ports/SequencePortProviderTest.java +++ b/src/test/java/redis/embedded/ports/SequencePortProviderTest.java @@ -1,8 +1,8 @@ package redis.embedded.ports; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class SequencePortProviderTest { From d45a818a4007807fbf29755f52a6e98eff926d81 Mon Sep 17 00:00:00 2001 From: Jesper Berggren <75118700+JesperBerggren@users.noreply.github.com> Date: Tue, 23 Apr 2024 12:48:17 +0200 Subject: [PATCH 2/7] Create maven-publish.yml --- .github/workflows/maven-publish.yml | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 00000000..cec8c645 --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,32 @@ +name: Publish package to the Maven Central Repository + +on: + release: + types: [created] + +jobs: + publish: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - name: Set up Maven Central Repository + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + server-id: central + server-username: ${{ secrets.CENTRAL_TOKEN_USERNAME }} + server-password: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} + gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} + gpg-passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} + + - name: Set version + run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }} + + - name: Publish package + run: mvn -P release --batch-mode deploy -DskipTests From be637bca5af081b4d8c8a750d814a0d33e7065fa Mon Sep 17 00:00:00 2001 From: Jesper Berggren Date: Wed, 24 Apr 2024 10:01:06 +0200 Subject: [PATCH 3/7] Fixed POM after setting Maven Central stuff up --- README.md | 57 ++++++++++++----------------------------------------- pom.xml | 59 +++++++++++++++++++++++++++++-------------------------- 2 files changed, 44 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index 0a05b373..b7d152c7 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,12 @@ embedded-redis ============== -Redis embedded server for Java integration testing +Redis embedded server for Java integration testing. -Fork Notes -============== -This repository clones from [kstyrc](https://github.com/kstyrc/embedded-redis) original repository. -The aim is to release some long waiting fixes. - - -**Source Website:** *[github.com/ozimov/embedded-redis](http://github.com/ozimov/embedded-redis/)*
- -**Latest Release:** *0.7.3*
-**Latest Artifact:** *it.ozimov:embedded-redis*
-**Continuous Integration:**
-[![Maven Central](https://maven-badges.herokuapp.com/maven-central/it.ozimov/embedded-redis/badge.svg)](https://maven-badges.herokuapp.com/maven-central/it.ozimov/embedded-redis) -
-[![Build Status](https://travis-ci.org/ozimov/embedded-redis.svg?branch=master)](https://travis-ci.org/ozimov/embedded-redis) -[![codecov.io](https://codecov.io/github/ozimov/embedded-redis/coverage.svg?branch=master)](https://codecov.io/github/ozimov/embedded-redis?branch=master) -[![Codacy Badge](https://api.codacy.com/project/badge/grade/7a4364b93df6473fb18a597e900edceb)](https://www.codacy.com/app/roberto-trunfio/embedded-redis) +Forked from [ozimov](https://github.com/ozimov/embedded-redis) which again was forked from [kstyrc](https://github.com/kstyrc/embedded-redis).
+Forked because both ozimov and kstyrc repositories doesn't appear to be maintained anymore. -![codecov.io](https://codecov.io/github/ozimov/embedded-redis/branch.svg?branch=master) +The primary goal of this fork is to keep the library up to date with all the latest versions/dependencies. Maven dependency ============== @@ -151,6 +137,15 @@ public class SomeIntegrationTestThatRequiresRedis { The above will create and start a cluster with sentinels on ports ```26739, 26912```, first replication group on ```6667, 6668```, second replication group on ```6387, 6379``` and third replication group on ephemeral ports. +Redis binaries +============== +Redis binaries are included in the library by default, but they are very old. +You should probably provide your own binaries to match a more recent version of Redis. + +IF no RedisExecProvider is given the code will attempt to discover which OS and Architecture is being used and choose an appropriate binary. + +Not all operating systems and architectures are supported. + Redis version ============== @@ -175,29 +170,3 @@ Contributors * Artem Orobets ([@enisher](http://github.com/enisher)) * Sean Simonsen ([@SeanSimonsen](http://github.com/SeanSimonsen)) * Rob Winch ([@rwinch](http://github.com/rwinch)) - - -Changelog -============== - -### 0.6 - * Support JDK 6 + - -### 0.5 - * OS detection fix - * redis binary per OS/arch pair - * Updated to 2.8.19 binary for Windows - -### 0.4 - * Updated for Java 8 - * Added Sentinel support - * Ability to create arbitrary clusters on arbitrary (ephemeral) ports - * Updated to latest guava - * Throw an exception if redis has not been started - * Redis errorStream logged to System.out - -### 0.3 - * Fluent API for RedisServer creation - -### 0.2 - * Initial decent release diff --git a/pom.xml b/pom.xml index 992c9118..18591c69 100644 --- a/pom.xml +++ b/pom.xml @@ -1,14 +1,16 @@ 4.0.0 - it.ozimov + io.github.jesperberggren embedded-redis jar - 0.8.0-SNAPSHOT + 0.1.0-SNAPSHOT embedded-redis Redis embedded server for Java integration testing. - Project forked from https://github.com/kstyrc/embedded-redis - https://github.com/ozimov/embedded-redis + Forked from https://github.com/ozimov/embedded-redis which again was forked from https://github.com/kstyrc/embedded-redis. + Forked because both ozimov and kstyrc repositories doesn't appear to be maintained anymore. + The primary goal of this fork is to keep the library up to date with all the latest versions/dependencies. + https://github.com/jesperberggren/embedded-redis @@ -18,17 +20,17 @@ - - https://github.com/ozimov/embedded-redis - scm:git:https://github.com/ozimov/embedded-redis.git - scm:git:https://github.com/ozimov/embedded-redis.git + - Krzysztof Styrc - kstyrc@gmail.com + Jesper Berggren + jbhenriksen@hotmail.com @@ -42,25 +44,16 @@ guava 33.1.0-jre
- commons-io commons-io 2.16.1 - org.slf4j slf4j-simple 2.0.13 - - - redis.clients @@ -246,6 +239,10 @@ + + java + none + org.apache.maven.plugins @@ -260,16 +257,22 @@ + + + --pinentry-mode + loopback + + - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 + org.sonatype.central + central-publishing-maven-plugin + 0.4.0 true - ossrh - https://oss.sonatype.org/ - true + central + true + true @@ -298,7 +301,7 @@ - + From 2b56ab0791ac239f80b48f197c03d6f96e6ef6e6 Mon Sep 17 00:00:00 2001 From: Jesper Berggren Date: Wed, 24 Apr 2024 10:07:28 +0200 Subject: [PATCH 4/7] Minor fix in README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b7d152c7..527a41b9 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Maven dependency Maven Central: ```xml - it.ozimov + io.github.jesperberggren embedded-redis - 0.7.3 + 0.1.0 ``` @@ -142,7 +142,7 @@ Redis binaries Redis binaries are included in the library by default, but they are very old. You should probably provide your own binaries to match a more recent version of Redis. -IF no RedisExecProvider is given the code will attempt to discover which OS and Architecture is being used and choose an appropriate binary. +If no RedisExecProvider is given the code will attempt to discover which OS and Architecture is being used and choose an appropriate binary. Not all operating systems and architectures are supported. From ff0edaa5765b0c98fc16ed94dd763adb1b41b01a Mon Sep 17 00:00:00 2001 From: Jesper Berggren Date: Wed, 24 Apr 2024 10:43:06 +0200 Subject: [PATCH 5/7] Updated versions in pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 18591c69..c432908a 100644 --- a/pom.xml +++ b/pom.xml @@ -151,7 +151,7 @@ org.apache.maven.plugins maven-scm-plugin - 2.0.1 + 2.1.0 false ${project.version} @@ -247,7 +247,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.3 + 3.2.4 sign-artifacts From a0ff30502f15174de7e6c61bc4c2191cabd5396e Mon Sep 17 00:00:00 2001 From: Jesper Berggren Date: Wed, 24 Apr 2024 11:05:00 +0200 Subject: [PATCH 6/7] Refactored maven-publish.yml --- .github/workflows/maven-publish.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index cec8c645..393c32c4 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -20,13 +20,17 @@ jobs: java-version: '17' distribution: 'temurin' server-id: central - server-username: ${{ secrets.CENTRAL_TOKEN_USERNAME }} - server-password: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} - gpg-passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Set version run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }} - name: Publish package run: mvn -P release --batch-mode deploy -DskipTests + env: + MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} \ No newline at end of file From 2b0be3e51893e2f264da5092f584754d2a27d64b Mon Sep 17 00:00:00 2001 From: Jesper Berggren Date: Wed, 24 Apr 2024 11:13:58 +0200 Subject: [PATCH 7/7] Re enabled SCM configuration in pom.xml --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index c432908a..98defe93 100644 --- a/pom.xml +++ b/pom.xml @@ -20,12 +20,12 @@ - + embedded-redis-0.1.0 +