From e48ddaeb99490ab08b409f4513a00b21b6f5eac0 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 6 Jan 2014 09:52:00 +0000 Subject: [PATCH] Fix grab test --- .../boot/cli/compiler/grape/AetherGrapeEngine.java | 2 +- .../springframework/boot/cli/GrabCommandIntegrationTests.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java index 263910b9c77..96441a24590 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java @@ -268,7 +268,7 @@ public class AetherGrapeEngine implements GrapeEngine { builder.setProxy(this.proxySelector.getProxy(repository)); repository = builder.build(); } - this.repositories.add(repository); + this.repositories.add(0, repository); } @Override diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/GrabCommandIntegrationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/GrabCommandIntegrationTests.java index 680fc5c495e..408f7197da4 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/GrabCommandIntegrationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/GrabCommandIntegrationTests.java @@ -56,6 +56,7 @@ public class GrabCommandIntegrationTests { String output = this.cli.grab("grab.groovy", "--autoconfigure=false"); assertTrue(new File("target/repository/net/sf/jopt-simple/jopt-simple") .isDirectory()); + // Should be resolved from local repository cache assertTrue(output.contains("Downloading: file:")); } }