diff --git a/build.gradle b/build.gradle index d72b8306..6ad5dbe1 100644 --- a/build.gradle +++ b/build.gradle @@ -265,24 +265,6 @@ project('spring-statemachine-zookeeper') { } } -project('spring-statemachine-redis') { - description = "Spring State Machine Redis" - - dependencies { - compile project(":spring-statemachine-core") - compile project(":spring-statemachine-kryo") - compile "org.springframework.data:spring-data-redis" - compile "redis.clients:jedis" - - testCompile project(":spring-statemachine-test") - testCompile "org.springframework:spring-test" - testCompile "org.hamcrest:hamcrest-core" - testCompile "org.hamcrest:hamcrest-library" - testCompile "junit:junit" - testRuntime "org.apache.logging.log4j:log4j-core" - } -} - project('spring-statemachine-data-common') { configurations { testArtifacts.extendsFrom testRuntime @@ -369,12 +351,13 @@ project('spring-statemachine-build-tests') { dependencies { testCompile project(":spring-statemachine-uml") testCompile project(":spring-statemachine-test") - testCompile project(":spring-statemachine-redis") testCompile project(":spring-statemachine-data-common:spring-statemachine-data-jpa") testCompile project(":spring-statemachine-data-common:spring-statemachine-data-redis") testCompile project(":spring-statemachine-data-common:spring-statemachine-data-mongodb") + testCompile "org.apache.commons:commons-pool2" testRuntime "org.springframework.boot:spring-boot-starter-data-mongodb" testRuntime "org.springframework.boot:spring-boot-starter-data-redis" + testRuntime "redis.clients:jedis" testCompile "org.springframework.boot:spring-boot-starter-data-jpa" testCompile "com.h2database:h2" testCompile "org.springframework.boot:spring-boot-starter" diff --git a/docs/src/reference/asciidoc/getting-started.adoc b/docs/src/reference/asciidoc/getting-started.adoc index da855ab1..6081ac1b 100644 --- a/docs/src/reference/asciidoc/getting-started.adoc +++ b/docs/src/reference/asciidoc/getting-started.adoc @@ -35,9 +35,6 @@ framework. |spring-statemachine-kryo |`Kryo` serializers for state machine. -|spring-statemachine-redis -|`Redis` related features for state machine. - |spring-statemachine-data-common |Common support module for `Spring Data`. diff --git a/settings.gradle b/settings.gradle index 58ac7be0..c54e00bc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,7 +4,6 @@ include 'spring-statemachine-core' include 'spring-statemachine-test' include 'spring-statemachine-kryo' include 'spring-statemachine-zookeeper' -include 'spring-statemachine-redis' include 'spring-statemachine-cluster' include 'spring-statemachine-uml' include 'spring-statemachine-build-tests' diff --git a/spring-statemachine-build-tests/src/test/java/org/springframework/statemachine/buildtests/RedisPersistTests.java b/spring-statemachine-build-tests/src/test/java/org/springframework/statemachine/buildtests/RedisPersistTests.java index 0e7f5f1c..a97ae58a 100644 --- a/spring-statemachine-build-tests/src/test/java/org/springframework/statemachine/buildtests/RedisPersistTests.java +++ b/spring-statemachine-build-tests/src/test/java/org/springframework/statemachine/buildtests/RedisPersistTests.java @@ -36,10 +36,10 @@ import org.springframework.statemachine.config.EnumStateMachineConfigurerAdapter import org.springframework.statemachine.config.StateMachineFactory; import org.springframework.statemachine.config.builders.StateMachineStateConfigurer; import org.springframework.statemachine.config.builders.StateMachineTransitionConfigurer; +import org.springframework.statemachine.data.redis.RedisStateMachineContextRepository; +import org.springframework.statemachine.data.redis.RedisStateMachinePersister; import org.springframework.statemachine.persist.RepositoryStateMachinePersist; import org.springframework.statemachine.persist.StateMachinePersister; -import org.springframework.statemachine.redis.RedisStateMachineContextRepository; -import org.springframework.statemachine.redis.RedisStateMachinePersister; public class RedisPersistTests extends AbstractBuildTests { diff --git a/spring-statemachine-redis/src/main/java/org/springframework/statemachine/redis/RedisStateMachineContextRepository.java b/spring-statemachine-data/redis/src/main/java/org/springframework/statemachine/data/redis/RedisStateMachineContextRepository.java similarity index 98% rename from spring-statemachine-redis/src/main/java/org/springframework/statemachine/redis/RedisStateMachineContextRepository.java rename to spring-statemachine-data/redis/src/main/java/org/springframework/statemachine/data/redis/RedisStateMachineContextRepository.java index a8ce58c5..fe856b9b 100644 --- a/spring-statemachine-redis/src/main/java/org/springframework/statemachine/redis/RedisStateMachineContextRepository.java +++ b/spring-statemachine-data/redis/src/main/java/org/springframework/statemachine/data/redis/RedisStateMachineContextRepository.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.statemachine.redis; +package org.springframework.statemachine.data.redis; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/spring-statemachine-redis/src/main/java/org/springframework/statemachine/redis/RedisStateMachinePersister.java b/spring-statemachine-data/redis/src/main/java/org/springframework/statemachine/data/redis/RedisStateMachinePersister.java similarity index 96% rename from spring-statemachine-redis/src/main/java/org/springframework/statemachine/redis/RedisStateMachinePersister.java rename to spring-statemachine-data/redis/src/main/java/org/springframework/statemachine/data/redis/RedisStateMachinePersister.java index ded32fb6..4e354231 100644 --- a/spring-statemachine-redis/src/main/java/org/springframework/statemachine/redis/RedisStateMachinePersister.java +++ b/spring-statemachine-data/redis/src/main/java/org/springframework/statemachine/data/redis/RedisStateMachinePersister.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.statemachine.redis; +package org.springframework.statemachine.data.redis; import org.springframework.statemachine.StateMachinePersist; import org.springframework.statemachine.persist.AbstractStateMachinePersister; diff --git a/spring-statemachine-samples/build.gradle b/spring-statemachine-samples/build.gradle index 0cdf11a6..3b75edd1 100644 --- a/spring-statemachine-samples/build.gradle +++ b/spring-statemachine-samples/build.gradle @@ -89,10 +89,11 @@ project('spring-statemachine-samples-security') { project('spring-statemachine-samples-eventservice') { description = 'Spring State Machine Event Service Sample' dependencies { - compile project(":spring-statemachine-redis") + compile project(":spring-statemachine-data-common:spring-statemachine-data-redis") compile("org.springframework.boot:spring-boot-starter-web") compile("org.springframework.boot:spring-boot-starter-thymeleaf") compile("org.apache.commons:commons-pool2") + runtime("redis.clients:jedis") } } diff --git a/spring-statemachine-samples/eventservice/src/main/java/demo/eventservice/StateMachineConfig.java b/spring-statemachine-samples/eventservice/src/main/java/demo/eventservice/StateMachineConfig.java index f46c4a4e..e6e58b14 100644 --- a/spring-statemachine-samples/eventservice/src/main/java/demo/eventservice/StateMachineConfig.java +++ b/spring-statemachine-samples/eventservice/src/main/java/demo/eventservice/StateMachineConfig.java @@ -35,9 +35,9 @@ import org.springframework.statemachine.StateMachinePersist; import org.springframework.statemachine.action.Action; import org.springframework.statemachine.config.StateMachineBuilder; import org.springframework.statemachine.config.StateMachineBuilder.Builder; +import org.springframework.statemachine.data.redis.RedisStateMachineContextRepository; +import org.springframework.statemachine.data.redis.RedisStateMachinePersister; import org.springframework.statemachine.persist.RepositoryStateMachinePersist; -import org.springframework.statemachine.redis.RedisStateMachineContextRepository; -import org.springframework.statemachine.redis.RedisStateMachinePersister; @Configuration public class StateMachineConfig {