Remove Boot-specifics from AetherGrapeEngine

With the goal of making AetherGrapeEngine generally useful with Groovy,
this commit removes any Boot specifics from it. Specifically, there
is now only a single default repository: Maven Central. The
Boot-specific Spring milestone and snapshot repositories are now added
via @GrabResolver annotations that are added using an ASTTransformation.

As part of this change, AetherGrapeEngine has also been updated to store
its repositories using a LinkedHashSet, this ensures that the same
repository is not used more than once while maintaining their ordering.
This commit is contained in:
Andy Wilkinson
2013-11-06 17:46:53 +00:00
parent b05f3e2eec
commit 32fc2c3d1c
4 changed files with 70 additions and 28 deletions

View File

@@ -87,23 +87,6 @@ public class AetherGrapeEngineTests {
assertEquals(6, customClassLoader.getURLs().length);
}
@Test(expected = DependencyResolutionFailedException.class)
public void resolutionWithSnapshotRepositoriesDisabled() {
Map<String, Object> args = new HashMap<String, Object>();
System.setProperty("disableSpringSnapshotRepos", "true");
try {
AetherGrapeEngine aetherGrapeEngine = new AetherGrapeEngine(
this.groovyClassLoader);
aetherGrapeEngine.addResolver(createResolver("restlet.org",
"http://maven.restlet.org"));
aetherGrapeEngine.grab(args,
createDependency("org.springframework", "spring-jdbc", "3.2.0.M1"));
}
finally {
System.clearProperty("disableSpringSnapshotRepos");
}
}
@Test
public void resolutionWithCustomResolver() {
Map<String, Object> args = new HashMap<String, Object>();