diff --git a/pom.xml b/pom.xml index 5ad062c1..91a37307 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-build - 2.0.0.M2 + 2.0.0.M4 @@ -117,11 +117,6 @@ spring-cloud-stream-test-support ${spring-cloud-stream.version} - - commons-logging - commons-logging-api - ${commons-logging.version} - @@ -137,15 +132,15 @@ - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT 2.0.0.M1 2.0.0.M1 - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT 2.0.0.M1 2.0.0.M1 - 4.0.0.M3 + 4.0.0.M5 1.1 - 7.0 + 8.0 UTF-8 ${project.build.directory}/coverage-reports/jacoco-ut.exec diff --git a/spring-cloud-task-batch/pom.xml b/spring-cloud-task-batch/pom.xml index 9ffaf1db..dbebb508 100644 --- a/spring-cloud-task-batch/pom.xml +++ b/spring-cloud-task-batch/pom.xml @@ -45,10 +45,6 @@ spring-batch-integration true - - commons-logging - commons-logging-api - org.springframework spring-test diff --git a/spring-cloud-task-core/pom.xml b/spring-cloud-task-core/pom.xml index efa1f70c..d881bbeb 100755 --- a/spring-cloud-task-core/pom.xml +++ b/spring-cloud-task-core/pom.xml @@ -71,11 +71,12 @@ spring-orm true - - org.hibernate + + org.hibernate.validator hibernate-validator test + diff --git a/spring-cloud-task-samples/batch-events/pom.xml b/spring-cloud-task-samples/batch-events/pom.xml index 2a368824..b2e67b8b 100644 --- a/spring-cloud-task-samples/batch-events/pom.xml +++ b/spring-cloud-task-samples/batch-events/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.0.M3 + 2.0.0.M5 @@ -51,19 +51,19 @@ org.springframework.cloud spring-cloud-starter-stream-rabbit - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT compile org.springframework.cloud spring-cloud-stream-binder-rabbit-test-support - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT test org.springframework.cloud spring-cloud-stream-test-support-internal - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT test diff --git a/spring-cloud-task-samples/batch-job/pom.xml b/spring-cloud-task-samples/batch-job/pom.xml index 611b4550..08ec6b97 100644 --- a/spring-cloud-task-samples/batch-job/pom.xml +++ b/spring-cloud-task-samples/batch-job/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.0.M3 + 2.0.0.M5 diff --git a/spring-cloud-task-samples/jpa-sample/pom.xml b/spring-cloud-task-samples/jpa-sample/pom.xml index 1d146692..64fcfeb4 100644 --- a/spring-cloud-task-samples/jpa-sample/pom.xml +++ b/spring-cloud-task-samples/jpa-sample/pom.xml @@ -27,7 +27,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.0.M3 + 2.0.0.M5 diff --git a/spring-cloud-task-samples/partitioned-batch-job/pom.xml b/spring-cloud-task-samples/partitioned-batch-job/pom.xml index 30b40ee9..e841cb53 100644 --- a/spring-cloud-task-samples/partitioned-batch-job/pom.xml +++ b/spring-cloud-task-samples/partitioned-batch-job/pom.xml @@ -12,7 +12,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.0.M3 + 2.0.0.M5 @@ -47,7 +47,7 @@ org.springframework.batch spring-batch-integration - 4.0.0.M3 + 4.0.0.M5 diff --git a/spring-cloud-task-samples/task-events/pom.xml b/spring-cloud-task-samples/task-events/pom.xml index 18ae388f..060ff9d5 100644 --- a/spring-cloud-task-samples/task-events/pom.xml +++ b/spring-cloud-task-samples/task-events/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.0.M3 + 2.0.0.M5 @@ -48,7 +48,7 @@ org.springframework.cloud spring-cloud-starter-stream-rabbit - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT compile diff --git a/spring-cloud-task-samples/taskprocessor/pom.xml b/spring-cloud-task-samples/taskprocessor/pom.xml index 809da7ba..f7a5ff08 100644 --- a/spring-cloud-task-samples/taskprocessor/pom.xml +++ b/spring-cloud-task-samples/taskprocessor/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.0.M3 + 2.0.0.M5 @@ -46,7 +46,7 @@ org.springframework.cloud spring-cloud-starter-stream-rabbit - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT compile @@ -56,7 +56,7 @@ org.springframework.cloud spring-cloud-stream-test-support - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT test diff --git a/spring-cloud-task-samples/taskprocessor/src/test/java/io/spring/TaskProcessorApplicationTests.java b/spring-cloud-task-samples/taskprocessor/src/test/java/io/spring/TaskProcessorApplicationTests.java index 3825089e..21d0f97e 100644 --- a/spring-cloud-task-samples/taskprocessor/src/test/java/io/spring/TaskProcessorApplicationTests.java +++ b/spring-cloud-task-samples/taskprocessor/src/test/java/io/spring/TaskProcessorApplicationTests.java @@ -16,9 +16,11 @@ package io.spring; +import java.io.IOException; import java.util.HashMap; import java.util.Map; +import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Test; import org.junit.runner.RunWith; @@ -27,6 +29,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.stream.messaging.Processor; import org.springframework.cloud.stream.test.binder.MessageCollector; import org.springframework.cloud.task.launcher.TaskLaunchRequest; +import org.springframework.messaging.Message; import org.springframework.messaging.support.GenericMessage; import org.springframework.test.context.junit4.SpringRunner; @@ -49,8 +52,10 @@ public class TaskProcessorApplicationTests { @Autowired protected MessageCollector collector; + private ObjectMapper mapper = new ObjectMapper(); + @Test - public void test() throws InterruptedException{ + public void test() throws InterruptedException, IOException { channels.input().send(new GenericMessage(DEFAULT_PAYLOAD)); Map properties = new HashMap(); properties.put("payload", DEFAULT_PAYLOAD); @@ -58,7 +63,9 @@ public class TaskProcessorApplicationTests { "maven://org.springframework.cloud.task.app:" + "timestamp-task:jar:1.0.1.RELEASE", null, properties, null, null); - assertThat(collector.forChannel(channels.output()), receivesPayloadThat(is(expectedRequest))); + Message result = (Message)collector.forChannel(channels.output()).take(); + TaskLaunchRequest tlq = mapper.readValue(result.getPayload(),TaskLaunchRequest.class); + assertThat(tlq, is(expectedRequest)); } } diff --git a/spring-cloud-task-samples/tasksink/pom.xml b/spring-cloud-task-samples/tasksink/pom.xml index d6c61273..bc159308 100644 --- a/spring-cloud-task-samples/tasksink/pom.xml +++ b/spring-cloud-task-samples/tasksink/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.0.M3 + 2.0.0.M5 @@ -46,13 +46,13 @@ org.springframework.cloud spring-cloud-starter-stream-rabbit - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT compile org.springframework.cloud spring-cloud-stream-test-support - 2.0.0.M1 + 2.0.0.BUILD-SNAPSHOT test diff --git a/spring-cloud-task-samples/timestamp/pom.xml b/spring-cloud-task-samples/timestamp/pom.xml index c14cd896..199d61d2 100644 --- a/spring-cloud-task-samples/timestamp/pom.xml +++ b/spring-cloud-task-samples/timestamp/pom.xml @@ -13,7 +13,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.0.M3 + 2.0.0.M5 diff --git a/spring-cloud-task-stream/pom.xml b/spring-cloud-task-stream/pom.xml index 0eb62210..d45aaa81 100644 --- a/spring-cloud-task-stream/pom.xml +++ b/spring-cloud-task-stream/pom.xml @@ -34,10 +34,6 @@ spring-cloud-deployer-local true - - commons-logging - commons-logging-api - org.springframework.cloud spring-cloud-deployer-spi diff --git a/spring-cloud-task-stream/src/main/java/org/springframework/cloud/task/launcher/TaskLaunchRequest.java b/spring-cloud-task-stream/src/main/java/org/springframework/cloud/task/launcher/TaskLaunchRequest.java index 8afb52e1..94491021 100644 --- a/spring-cloud-task-stream/src/main/java/org/springframework/cloud/task/launcher/TaskLaunchRequest.java +++ b/spring-cloud-task-stream/src/main/java/org/springframework/cloud/task/launcher/TaskLaunchRequest.java @@ -44,7 +44,7 @@ public class TaskLaunchRequest implements Serializable{ private String applicationName; /** - * Constructor for the TaskLaunchRequest; + * Constructor for the TaskLaunchRequest. * @param uri the URI to the task artifact to be launched. * @param commandlineArguments list of commandlineArguments to be used by the task * @param environmentProperties are the environment variables for this task. @@ -66,6 +66,14 @@ public class TaskLaunchRequest implements Serializable{ setApplicationName(applicationName); } + /** + * Constructor for the TaskLaunchRequest. + * + * @since 2.0.0 + */ + public TaskLaunchRequest() { + } + /** * Returns the current uri to the artifact for this launch request. */