Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 27 additions & 135 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>it.ozimov</groupId>
<groupId>com.lookiero</groupId>
<artifactId>embedded-redis</artifactId>
<packaging>jar</packaging>
<version>0.7.3-SNAPSHOT</version>
<version>0.7.5-Alpine-SNAPSHOT</version>
<name>embedded-redis</name>
<description>Redis embedded server for Java integration testing.
Project forked from https://github.com/kstyrc/embedded-redis</description>
Expand All @@ -19,20 +19,13 @@
</licenses>

<scm>
<url>https://github.com/ozimov/embedded-redis</url>
<connection>scm:git:https://github.com/ozimov/embedded-redis.git</connection>
<developerConnection>scm:git:https://github.com/ozimov/embedded-redis.git</developerConnection>
<url>https://github.com/lookiero/embedded-redis</url>
<connection>scm:git:https://github.com/lookiero/embedded-redis.git</connection>
<developerConnection>scm:git:https://github.com/lookiero/embedded-redis.git</developerConnection>
<tag>embedded-redis-0.7.2</tag>
</scm>

<developers>
<developer>
<name>Krzysztof Styrc</name>
<email>kstyrc@gmail.com</email>
</developer>
</developers>

<properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -90,16 +83,6 @@
<maven>3.0.4</maven>
</prerequisites>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<resources>
<resource>
Expand All @@ -110,102 +93,54 @@
</resource>
</resources>
<plugins>
<!-- MAVEN SUREFIRE + FAILSAFE -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
<!-- Partially works for Lombok -->
<configuration>
<excludes>
<exclude>**/config/**</exclude>
<exclude>**/model/**</exclude>
<exclude>**/item/**</exclude>
</excludes>
</configuration>
</plugin>

<!--Deploy plugins -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.3</version>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
<compilerVersion>1.6</compilerVersion>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.5</version>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<pushChanges>false</pushChanges>
<tag>${project.version}</tag>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>

</plugins>
</build>

<profiles>
<profile>
<id>disable-java8-doclint</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<version>2.8.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -215,10 +150,11 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -229,55 +165,11 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

</plugins>
</build>
</profile>
</profiles>

<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.3</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
<report>property-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
<!--DISCLAIMER: use as-->
<!--mvn versions:display-dependency-updates-->

<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</profiles>

</project>
2 changes: 1 addition & 1 deletion src/main/java/redis/embedded/RedisExecProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private void initExecutables() {
executables.put(OsArchitecture.WINDOWS_x86_64, "redis-server-2.8.19.exe");

executables.put(OsArchitecture.UNIX_x86, "redis-server-2.8.19-32");
executables.put(OsArchitecture.UNIX_x86_64, "redis-server-2.8.19");
executables.put(OsArchitecture.UNIX_x86_64, "redis-server-alpine");

executables.put(OsArchitecture.MAC_OS_X_x86, "redis-server-2.8.19.app");
executables.put(OsArchitecture.MAC_OS_X_x86_64, "redis-server-2.8.19.app");
Expand Down
Binary file removed src/main/resources/redis-server-2.8.19
Binary file not shown.
Binary file added src/main/resources/redis-server-alpine
Binary file not shown.
19 changes: 11 additions & 8 deletions src/test/java/redis/embedded/RedisServerTest.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
package redis.embedded;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import com.google.common.io.Resources;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import org.junit.Test;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.embedded.exceptions.RedisBuildingException;
import redis.embedded.util.Architecture;
import redis.embedded.util.OS;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static org.junit.Assert.*;

public class RedisServerTest {

private RedisServer redisServer;
Expand Down Expand Up @@ -98,10 +101,10 @@ public void shouldIndicateInactiveAfterStop() throws Exception {
public void shouldOverrideDefaultExecutable() throws Exception {
RedisExecProvider customProvider = RedisExecProvider.defaultProvider()
.override(OS.UNIX, Architecture.x86, Resources.getResource("redis-server-2.8.19-32").getFile())
.override(OS.UNIX, Architecture.x86_64, Resources.getResource("redis-server-2.8.19").getFile())
.override(OS.UNIX, Architecture.x86_64, Resources.getResource("redis-server-alpine").getFile())
.override(OS.WINDOWS, Architecture.x86, Resources.getResource("redis-server-2.8.19.exe").getFile())
.override(OS.WINDOWS, Architecture.x86_64, Resources.getResource("redis-server-2.8.19.exe").getFile())
.override(OS.MAC_OS_X, Resources.getResource("redis-server-2.8.19").getFile());
.override(OS.MAC_OS_X, Resources.getResource("redis-server-alpine").getFile());

redisServer = new RedisServerBuilder()
.redisExecProvider(customProvider)
Expand Down