org.springframework.cloud.deployer.resource.maven.MavenResourceLoader Java Examples

The following examples show how to use org.springframework.cloud.deployer.resource.maven.MavenResourceLoader. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SkipperServerConfiguration.java    From spring-cloud-skipper with Apache License 2.0 5 votes vote down vote up
@Bean
public DelegatingResourceLoader delegatingResourceLoader(MavenProperties mavenProperties) {
	DockerResourceLoader dockerLoader = new DockerResourceLoader();
	MavenResourceLoader mavenResourceLoader = new MavenResourceLoader(mavenProperties);
	Map<String, ResourceLoader> loaders = new HashMap<>();
	loaders.put("docker", dockerLoader);
	loaders.put("maven", mavenResourceLoader);
	return new DelegatingResourceLoader(loaders);
}
 
Example #2
Source File: ServerDependencies.java    From spring-cloud-skipper with Apache License 2.0 5 votes vote down vote up
@Bean
public DelegatingResourceLoader delegatingResourceLoader(MavenProperties mavenProperties) {
	DockerResourceLoader dockerLoader = new DockerResourceLoader();
	MavenResourceLoader mavenResourceLoader = new MavenResourceLoader(mavenProperties);
	Map<String, ResourceLoader> loaders = new HashMap<>();
	loaders.put("docker", dockerLoader);
	loaders.put("maven", mavenResourceLoader);
	return new DelegatingResourceLoader(loaders);
}
 
Example #3
Source File: DataFlowControllerAutoConfiguration.java    From spring-cloud-dashboard with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean(DelegatingResourceLoader.class)
public DelegatingResourceLoader delegatingResourceLoader(MavenResourceLoader mavenResourceLoader) {
	Map<String, ResourceLoader> loaders = new HashMap<>();
	loaders.put("maven", mavenResourceLoader);
	return new DelegatingResourceLoader(loaders);
}
 
Example #4
Source File: TestDependencies.java    From spring-cloud-dashboard with Apache License 2.0 5 votes vote down vote up
@Bean
public ResourceLoader resourceLoader() {
	MavenProperties mavenProperties = new MavenProperties();
	mavenProperties.setRemoteRepositories(new HashMap<>(Collections.singletonMap("springRepo",
			new MavenProperties.RemoteRepository("https://repo.spring.io/libs-snapshot"))));

	Map<String, ResourceLoader> resourceLoaders = new HashMap<>();
	resourceLoaders.put("maven", new MavenResourceLoader(mavenProperties));
	resourceLoaders.put("file", new FileSystemResourceLoader());

	DelegatingResourceLoader delegatingResourceLoader = new DelegatingResourceLoader(resourceLoaders);
	return delegatingResourceLoader;
}
 
Example #5
Source File: LocalDataFlowServerAutoConfiguration.java    From spring-cloud-dataflow with Apache License 2.0 5 votes vote down vote up
@Bean
public DelegatingResourceLoader delegatingResourceLoader(MavenProperties mavenProperties) {
	DockerResourceLoader dockerLoader = new DockerResourceLoader();
	MavenResourceLoader mavenResourceLoader = new MavenResourceLoader(mavenProperties);
	Map<String, ResourceLoader> loaders = new HashMap<>();
	loaders.put("docker", dockerLoader);
	loaders.put("maven", mavenResourceLoader);
	return new DelegatingResourceLoader(loaders);
}
 
Example #6
Source File: TestDependencies.java    From spring-cloud-dataflow with Apache License 2.0 5 votes vote down vote up
@Bean
public DelegatingResourceLoader resourceLoader(MavenProperties mavenProperties) {
	Map<String, ResourceLoader> resourceLoaders = new HashMap<>();
	resourceLoaders.put("maven", new MavenResourceLoader(mavenProperties));
	resourceLoaders.put("file", new FileSystemResourceLoader());

	DelegatingResourceLoader delegatingResourceLoader = new DelegatingResourceLoader(resourceLoaders);
	return delegatingResourceLoader;
}
 
Example #7
Source File: DataFlowControllerAutoConfiguration.java    From spring-cloud-dashboard with Apache License 2.0 4 votes vote down vote up
@Bean
public MavenResourceLoader mavenResourceLoader(MavenProperties properties) {
	return new MavenResourceLoader(properties);
}
 
Example #8
Source File: ResourceLoadingAutoConfiguration.java    From spring-cloud-deployer with Apache License 2.0 4 votes vote down vote up
@Bean
@Order(0)
public DelegatingResourceLoaderBuilderCustomizer mavenDelegatingResourceLoaderBuilderCustomizer(MavenProperties mavenProperties) {
	return customizer -> customizer.loader("maven", new MavenResourceLoader(mavenProperties));
}
 
Example #9
Source File: DeployerConfiguration.java    From spring-cloud-cli with Apache License 2.0 4 votes vote down vote up
@Bean
public MavenResourceLoader mavenResourceLoader(MavenProperties mavenProperties) {
	return new MavenResourceLoader(mavenProperties);
}
 
Example #10
Source File: DeployerConfiguration.java    From spring-cloud-cli with Apache License 2.0 4 votes vote down vote up
@Bean
public DelegatingResourceLoader delegatingResourceLoader(MavenResourceLoader mavenResourceLoader) {
	HashMap<String, ResourceLoader> map = new HashMap<>();
	map.put("maven", mavenResourceLoader);
	return new DelegatingResourceLoader(map);
}