Browse Source

Don't use snapshot repos for CLI test

Update SampleIntegrationTests to only use local maven repo when
running integration tests.
pull/13/head
Phillip Webb 13 years ago
parent
commit
f4c129a063
  1. 10
      spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GrapeEngineCustomizer.java
  2. 11
      spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java

10
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GrapeEngineCustomizer.java

@ -85,10 +85,12 @@ class GrapeEngineCustomizer { @@ -85,10 +85,12 @@ class GrapeEngineCustomizer {
springBootResolver.setSettings(settings);
springBootResolver.setName("springBoot");
springBootResolver.addSpringSnapshotResolver(newResolver("spring-snapshot",
"http://repo.springsource.org/snapshot"));
springBootResolver.addSpringSnapshotResolver(newResolver("spring-milestone",
"http://repo.springsource.org/milestone"));
if (!Boolean.getBoolean("disableSpringSnapshotRepos")) {
springBootResolver.addSpringSnapshotResolver(newResolver("spring-snapshot",
"http://repo.springsource.org/snapshot"));
springBootResolver.addSpringSnapshotResolver(newResolver("spring-milestone",
"http://repo.springsource.org/milestone"));
}
grapesResolver.getResolvers().clear();
grapesResolver.getResolvers().add(springBootResolver);

11
spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java

@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit; @@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit;
import org.apache.ivy.util.FileUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
@ -64,6 +65,16 @@ public class SampleIntegrationTests { @@ -64,6 +65,16 @@ public class SampleIntegrationTests {
this.command = future.get(4, TimeUnit.MINUTES);
}
@Before
public void setup() {
System.setProperty("disableSpringSnapshotRepos", "true");
}
@After
public void teardown() {
System.clearProperty("disableSpringSnapshotRepos");
}
@After
public void stop() {
if (this.command != null) {

Loading…
Cancel
Save