Commit f4c129a0 authored by Phillip Webb's avatar Phillip Webb

Don't use snapshot repos for CLI test

Update SampleIntegrationTests to only use local maven repo when
running integration tests.
parent e773db24
...@@ -85,10 +85,12 @@ class GrapeEngineCustomizer { ...@@ -85,10 +85,12 @@ class GrapeEngineCustomizer {
springBootResolver.setSettings(settings); springBootResolver.setSettings(settings);
springBootResolver.setName("springBoot"); springBootResolver.setName("springBoot");
springBootResolver.addSpringSnapshotResolver(newResolver("spring-snapshot", if (!Boolean.getBoolean("disableSpringSnapshotRepos")) {
"http://repo.springsource.org/snapshot")); springBootResolver.addSpringSnapshotResolver(newResolver("spring-snapshot",
springBootResolver.addSpringSnapshotResolver(newResolver("spring-milestone", "http://repo.springsource.org/snapshot"));
"http://repo.springsource.org/milestone")); springBootResolver.addSpringSnapshotResolver(newResolver("spring-milestone",
"http://repo.springsource.org/milestone"));
}
grapesResolver.getResolvers().clear(); grapesResolver.getResolvers().clear();
grapesResolver.getResolvers().add(springBootResolver); grapesResolver.getResolvers().add(springBootResolver);
......
...@@ -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.apache.ivy.util.FileUtil;
import org.junit.After; import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; 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); this.command = future.get(4, TimeUnit.MINUTES);
} }
@Before
public void setup() {
System.setProperty("disableSpringSnapshotRepos", "true");
}
@After
public void teardown() {
System.clearProperty("disableSpringSnapshotRepos");
}
@After @After
public void stop() { public void stop() {
if (this.command != null) { if (this.command != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment