diff --git a/pom.xml b/pom.xml index 697489ef9..7a12bde30 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 1.8 - 3.0.4.RELEASE + Aluminium-SR1 Brooklyn.SR2 1.0.0.BUILD-SNAPSHOT 1.5.1.RELEASE @@ -26,8 +26,10 @@ io.projectreactor - reactor-core - ${reactor.version} + reactor-bom + ${reactor-bom.version} + pom + import org.springframework.cloud diff --git a/spring-cloud-function-deployer/pom.xml b/spring-cloud-function-deployer/pom.xml index 8fc5e0c7e..533cbb2e9 100644 --- a/spring-cloud-function-deployer/pom.xml +++ b/spring-cloud-function-deployer/pom.xml @@ -17,10 +17,14 @@ 1.8 1.0.0.BUILD-SNAPSHOT - 3.0.4.RELEASE + + org.apache.maven + maven-aether-provider + 3.3.9 + org.springframework.cloud spring-cloud-function-core diff --git a/spring-cloud-function-deployer/src/main/java/org/springframework/cloud/function/deployer/ApplicationRunner.java b/spring-cloud-function-deployer/src/main/java/org/springframework/cloud/function/deployer/ApplicationRunner.java index 0eaef5e5a..65cdd29d5 100644 --- a/spring-cloud-function-deployer/src/main/java/org/springframework/cloud/function/deployer/ApplicationRunner.java +++ b/spring-cloud-function-deployer/src/main/java/org/springframework/cloud/function/deployer/ApplicationRunner.java @@ -32,16 +32,12 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.eclipse.aether.artifact.DefaultArtifact; import org.eclipse.aether.graph.Dependency; -import org.eclipse.aether.resolution.ArtifactResolutionException; - import org.springframework.boot.Banner.Mode; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.cli.compiler.RepositoryConfigurationFactory; -import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext; import org.springframework.boot.loader.archive.Archive; -import org.springframework.boot.loader.thin.AetherEngine; import org.springframework.boot.loader.thin.ArchiveUtils; +import org.springframework.boot.loader.thin.DependencyResolver; import org.springframework.cloud.deployer.thin.ContextRunner; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; @@ -129,31 +125,23 @@ public class ApplicationRunner implements CommandLineRunner { for (URL url : urls) { child.add(url); } - DependencyResolutionContext context = new DependencyResolutionContext(); - AetherEngine engine = AetherEngine.create( - RepositoryConfigurationFactory.createDefaultRepositoryConfiguration(), - context); + DependencyResolver resolver = DependencyResolver.instance(); String reactor = getReactorCoordinates(); // spring-core is OK, spring-context is not, spring-messaging depends on // spring-context (so it is not OK) String spring = getSpringCoordinates(); - try { - List resolved = engine.resolve( - Arrays.asList(new Dependency(new DefaultArtifact(reactor), "runtime"), - new Dependency(new DefaultArtifact(spring), "runtime"))); - for (File archive : resolved) { - try { - URL url = archive.toURI().toURL(); - parent.add(url); - child.remove(url); - } - catch (MalformedURLException e) { - throw new IllegalStateException("Cannot locate jar for: " + archive); - } + List resolved = Arrays.asList( + resolver.resolve(new Dependency(new DefaultArtifact(reactor), "runtime")), + resolver.resolve(new Dependency(new DefaultArtifact(spring), "runtime"))); + for (File archive : resolved) { + try { + URL url = archive.toURI().toURL(); + parent.add(url); + child.remove(url); + } + catch (MalformedURLException e) { + throw new IllegalStateException("Cannot locate jar for: " + archive); } - } - catch (ArtifactResolutionException e) { - throw new IllegalStateException("Cannot resolve archive for " + reactor, e); } logger.info("Parent: " + parent); logger.info("Child: " + child); diff --git a/spring-cloud-function-samples/spring-cloud-function-sample-pojo/pom.xml b/spring-cloud-function-samples/spring-cloud-function-sample-pojo/pom.xml index 9265b90bf..0a1779fb8 100644 --- a/spring-cloud-function-samples/spring-cloud-function-sample-pojo/pom.xml +++ b/spring-cloud-function-samples/spring-cloud-function-sample-pojo/pom.xml @@ -21,16 +21,10 @@ 1.8 1.0.0.BUILD-SNAPSHOT 1.0.0.BUILD-SNAPSHOT - 3.0.4.RELEASE + 3.0.5.RELEASE - - - io.projectreactor - reactor-core - ${reactor.version} - org.springframework.cloud spring-cloud-function-web diff --git a/spring-cloud-function-samples/spring-cloud-function-sample/pom.xml b/spring-cloud-function-samples/spring-cloud-function-sample/pom.xml index dc7121c89..b3f530f23 100644 --- a/spring-cloud-function-samples/spring-cloud-function-sample/pom.xml +++ b/spring-cloud-function-samples/spring-cloud-function-sample/pom.xml @@ -21,17 +21,11 @@ 1.8 1.0.0.BUILD-SNAPSHOT 1.0.0.BUILD-SNAPSHOT - 3.0.4.RELEASE + 3.0.5.RELEASE 1.5.1.RELEASE - - - io.projectreactor - reactor-core - ${reactor.version} - org.springframework.cloud spring-cloud-function-web diff --git a/spring-cloud-function-stream/pom.xml b/spring-cloud-function-stream/pom.xml index 875fd8d9d..e3e34fe1b 100644 --- a/spring-cloud-function-stream/pom.xml +++ b/spring-cloud-function-stream/pom.xml @@ -16,7 +16,6 @@ 1.8 - 3.0.4.RELEASE 1.1.1.BUILD-SNAPSHOT