Update reactor versions

This commit is contained in:
Dave Syer
2017-02-23 15:20:15 +00:00
parent d6a4ccf001
commit fa86e5fb1f
6 changed files with 25 additions and 44 deletions

View File

@@ -16,7 +16,7 @@
<properties>
<java.version>1.8</java.version>
<reactor.version>3.0.4.RELEASE</reactor.version>
<reactor-bom.version>Aluminium-SR1</reactor-bom.version>
<spring-cloud-stream.version>Brooklyn.SR2</spring-cloud-stream.version>
<wrapper.version>1.0.0.BUILD-SNAPSHOT</wrapper.version>
<spring-boot.version>1.5.1.RELEASE</spring-boot.version>
@@ -26,8 +26,10 @@
<dependencies>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>${reactor.version}</version>
<artifactId>reactor-bom</artifactId>
<version>${reactor-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>

View File

@@ -17,10 +17,14 @@
<properties>
<java.version>1.8</java.version>
<spring-cloud-deployer-thin.version>1.0.0.BUILD-SNAPSHOT</spring-cloud-deployer-thin.version>
<reactor.version>3.0.4.RELEASE</reactor.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-aether-provider</artifactId>
<version>3.3.9</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-core</artifactId>

View File

@@ -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<File> 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<File> 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);

View File

@@ -21,16 +21,10 @@
<java.version>1.8</java.version>
<spring-cloud-function.version>1.0.0.BUILD-SNAPSHOT</spring-cloud-function.version>
<wrapper.version>1.0.0.BUILD-SNAPSHOT</wrapper.version>
<reactor.version>3.0.4.RELEASE</reactor.version>
<reactor.version>3.0.5.RELEASE</reactor.version>
</properties>
<dependencies>
<dependency>
<!-- TODO: this shouldn't be needed (bug in thin launcher) -->
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>${reactor.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-web</artifactId>

View File

@@ -21,17 +21,11 @@
<java.version>1.8</java.version>
<spring-cloud-function.version>1.0.0.BUILD-SNAPSHOT</spring-cloud-function.version>
<wrapper.version>1.0.0.BUILD-SNAPSHOT</wrapper.version>
<reactor.version>3.0.4.RELEASE</reactor.version>
<reactor.version>3.0.5.RELEASE</reactor.version>
<spring-boot.version>1.5.1.RELEASE</spring-boot.version>
</properties>
<dependencies>
<dependency>
<!-- TODO: this shouldn't be needed (bug in thin launcher) -->
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>${reactor.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-web</artifactId>

View File

@@ -16,7 +16,6 @@
<properties>
<java.version>1.8</java.version>
<reactor.version>3.0.4.RELEASE</reactor.version>
<stream.version>1.1.1.BUILD-SNAPSHOT</stream.version>
</properties>