Refactored dependency management

Created a Spring Boot starter that can be used to configure Spring Cloud
Task and it's related functionality.

Updates per code review

Removed autowiring of app context

Refactored DeployerPartitionHandler to correctly use environment variables

Exposed deployment properties of TaskLauncher

Exposed deployment properties via the TaskLaunchRequest

Updated based on code review
This commit is contained in:
Michael Minella
2016-06-30 23:10:08 -05:00
committed by Glenn Renfro
parent a1c1dd161f
commit 57e9d4dcae
39 changed files with 369 additions and 142 deletions

View File

@@ -64,11 +64,16 @@ look like the following:
@Bean
public PartitionHandler partitionHandler(TaskLauncher taskLauncher,
JobExplorer jobExplorer) throws Exception {
MavenResource resource =
MavenProperties mavenProperties = new MavenProperties();
mavenProperties.setRemoteRepositories(new HashMap<>(Collections.singletonMap("springRepo",
new MavenProperties.RemoteRepository(repository))));
MavenResource resource =
MavenResource.parse(String.format("%s:%s:%s",
"io.spring.cloud",
"partitioned-batch-job",
"1.0.0.RELEASE"));
"1.0.0.RELEASE"), mavenProperties);
DeployerPartitionHandler partitionHandler =
new DeployerPartitionHandler(taskLauncher, jobExplorer, resource, "workerStep");
@@ -85,11 +90,12 @@ public PartitionHandler partitionHandler(TaskLauncher taskLauncher,
The `Resource` to be executed is expected to be a Spring Boot über-jar with a
`DeployerStepExecutionHandler` configured as a `CommandLineRunner` in the current context.
Both the master and slave are expected to have visibility into the same data store being
used as the job repository and task repository. Once the underlying infrastructure has
bootstrapped the Spring Boot jar and Spring Boot has launched the
`DeployerStepExecutionHandler`, the step handler will execute the Step requested. An
example of configuring the `DefaultStepExecutionHandler`:
The repository enumerated in the example above should be the location of the remote repository
from which the über-jar is located. Both the master and slave are expected to have
visibility into the same data store being used as the job repository and task repository.
Once the underlying infrastructure has bootstrapped the Spring Boot jar and Spring Boot
has launched the `DeployerStepExecutionHandler`, the step handler will execute the Step
requested. An example of configuring the `DefaultStepExecutionHandler` is show below:
```
@Bean

View File

@@ -42,6 +42,10 @@ repository execute a maven build from the `spring-cloud-task-samples` directory
property `skipInstall` set to false. For example:
`mvn clean install`.
NOTE: The maven.remoteRepositories.springRepo.url property will need to be set to
the location of the remote repository from which the über-jar is located. If not
set, then there will be no remote repository, so it will rely upon the local repository only.
[[stream-integration-launching-sink-dataflow]]
=== Spring Cloud Data Flow