Skip to content

Commit 91060a9

Browse files
committed
Merge branch '2.7.x'
2 parents 0d2e3bc + 6fa4b94 commit 91060a9

File tree

6 files changed

+30
-29
lines changed

6 files changed

+30
-29
lines changed

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
2626
import java.util.List;
2727
import java.util.ServiceLoader;
2828

29+
import groovy.grape.GrapeEngine;
2930
import groovy.lang.GroovyClassLoader;
3031
import groovy.lang.GroovyClassLoader.ClassCollector;
3132
import groovy.lang.GroovyCodeSource;
@@ -44,10 +45,9 @@
4445
import org.codehaus.groovy.transform.ASTTransformationVisitor;
4546

4647
import org.springframework.boot.cli.compiler.dependencies.SpringBootDependenciesDependencyManagement;
47-
import org.springframework.boot.cli.compiler.grape.AetherGrapeEngine;
48-
import org.springframework.boot.cli.compiler.grape.AetherGrapeEngineFactory;
4948
import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
5049
import org.springframework.boot.cli.compiler.grape.GrapeEngineInstaller;
50+
import org.springframework.boot.cli.compiler.grape.MavenResolverGrapeEngineFactory;
5151
import org.springframework.boot.cli.util.ResourceUtils;
5252
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
5353
import org.springframework.util.ClassUtils;
@@ -96,7 +96,7 @@ public GroovyCompiler(GroovyCompilerConfiguration configuration) {
9696
DependencyResolutionContext resolutionContext = new DependencyResolutionContext();
9797
resolutionContext.addDependencyManagement(new SpringBootDependenciesDependencyManagement());
9898

99-
AetherGrapeEngine grapeEngine = AetherGrapeEngineFactory.create(this.loader,
99+
GrapeEngine grapeEngine = MavenResolverGrapeEngineFactory.create(this.loader,
100100
configuration.getRepositoryConfiguration(), resolutionContext, configuration.isQuiet());
101101

102102
GrapeEngineInstaller.install(grapeEngine);
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -44,15 +44,15 @@
4444

4545
/**
4646
* A {@link GrapeEngine} implementation that uses
47-
* <a href="https://eclipse.org/aether">Aether</a>, the dependency resolution system used
48-
* by Maven.
47+
* <a href="https://maven.apache.org/resolver/index.html">Maven Resolver</a>, the
48+
* dependency resolution system used by Maven.
4949
*
5050
* @author Andy Wilkinson
5151
* @author Phillip Webb
52-
* @since 1.0.0
52+
* @since 2.5.9
5353
*/
5454
@SuppressWarnings("rawtypes")
55-
public class AetherGrapeEngine implements GrapeEngine {
55+
public class MavenResolverGrapeEngine implements GrapeEngine {
5656

5757
private static final Collection<Exclusion> WILDCARD_EXCLUSION;
5858

@@ -74,7 +74,7 @@ public class AetherGrapeEngine implements GrapeEngine {
7474

7575
private final List<RemoteRepository> repositories;
7676

77-
public AetherGrapeEngine(GroovyClassLoader classLoader, RepositorySystem repositorySystem,
77+
public MavenResolverGrapeEngine(GroovyClassLoader classLoader, RepositorySystem repositorySystem,
7878
DefaultRepositorySystemSession repositorySystemSession, List<RemoteRepository> remoteRepositories,
7979
DependencyResolutionContext resolutionContext, boolean quiet) {
8080
this.classLoader = classLoader;
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,14 +36,14 @@
3636
import org.eclipse.aether.transport.http.HttpTransporterFactory;
3737

3838
/**
39-
* Utility class to create a pre-configured {@link AetherGrapeEngine}.
39+
* Utility class to create a pre-configured {@link MavenResolverGrapeEngine}.
4040
*
4141
* @author Andy Wilkinson
42-
* @since 1.0.0
42+
* @since 2.5.9
4343
*/
44-
public abstract class AetherGrapeEngineFactory {
44+
public abstract class MavenResolverGrapeEngineFactory {
4545

46-
public static AetherGrapeEngine create(GroovyClassLoader classLoader,
46+
public static MavenResolverGrapeEngine create(GroovyClassLoader classLoader,
4747
List<RepositoryConfiguration> repositoryConfigurations,
4848
DependencyResolutionContext dependencyResolutionContext, boolean quiet) {
4949
RepositorySystem repositorySystem = createServiceLocator().getService(RepositorySystem.class);
@@ -54,7 +54,7 @@ public static AetherGrapeEngine create(GroovyClassLoader classLoader,
5454
autoConfiguration.apply(repositorySystemSession, repositorySystem);
5555
}
5656
new DefaultRepositorySystemSessionAutoConfiguration().apply(repositorySystemSession, repositorySystem);
57-
return new AetherGrapeEngine(classLoader, repositorySystem, repositorySystemSession,
57+
return new MavenResolverGrapeEngine(classLoader, repositorySystem, repositorySystemSession,
5858
createRepositories(repositoryConfigurations), dependencyResolutionContext, quiet);
5959
}
6060

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/RepositorySystemSessionAutoConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@
2020
import org.eclipse.aether.RepositorySystem;
2121

2222
/**
23-
* Strategy that can be used to apply some auto-configuration during the installation of
24-
* an {@link AetherGrapeEngine}.
23+
* Strategy that can be used to apply some auto-configuration during the installation of a
24+
* {@link MavenResolverGrapeEngine}.
2525
*
2626
* @author Andy Wilkinson
2727
* @since 1.0.0
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
2626
import java.util.List;
2727
import java.util.Map;
2828

29+
import groovy.grape.GrapeEngine;
2930
import groovy.lang.GroovyClassLoader;
3031
import org.eclipse.aether.DefaultRepositorySystemSession;
3132
import org.eclipse.aether.repository.Authentication;
@@ -43,7 +44,7 @@
4344
*
4445
* @author Andy Wilkinson
4546
*/
46-
class AetherGrapeEngineTests {
47+
class MavenResolverGrapeEngineTests {
4748

4849
private final GroovyClassLoader groovyClassLoader = new GroovyClassLoader();
4950

@@ -53,14 +54,14 @@ class AetherGrapeEngineTests {
5354
private final RepositoryConfiguration springSnapshot = new RepositoryConfiguration("spring-snapshot",
5455
URI.create("https://repo.spring.io/snapshot"), true);
5556

56-
private AetherGrapeEngine createGrapeEngine(RepositoryConfiguration... additionalRepositories) {
57+
private GrapeEngine createGrapeEngine(RepositoryConfiguration... additionalRepositories) {
5758
List<RepositoryConfiguration> repositoryConfigurations = new ArrayList<>();
5859
repositoryConfigurations
5960
.add(new RepositoryConfiguration("central", URI.create("https://repo1.maven.org/maven2"), false));
6061
repositoryConfigurations.addAll(Arrays.asList(additionalRepositories));
6162
DependencyResolutionContext dependencyResolutionContext = new DependencyResolutionContext();
6263
dependencyResolutionContext.addDependencyManagement(new SpringBootDependenciesDependencyManagement());
63-
return AetherGrapeEngineFactory.create(this.groovyClassLoader, repositoryConfigurations,
64+
return MavenResolverGrapeEngineFactory.create(this.groovyClassLoader, repositoryConfigurations,
6465
dependencyResolutionContext, false);
6566
}
6667

@@ -75,7 +76,7 @@ void dependencyResolution() {
7576
@Test
7677
void proxySelector() {
7778
doWithCustomUserHome(() -> {
78-
AetherGrapeEngine grapeEngine = createGrapeEngine();
79+
GrapeEngine grapeEngine = createGrapeEngine();
7980
DefaultRepositorySystemSession session = (DefaultRepositorySystemSession) ReflectionTestUtils
8081
.getField(grapeEngine, "session");
8182

@@ -139,7 +140,7 @@ void dependencyResolutionWithCustomClassLoader() {
139140
@Test
140141
void resolutionWithCustomResolver() {
141142
Map<String, Object> args = new HashMap<>();
142-
AetherGrapeEngine grapeEngine = createGrapeEngine();
143+
GrapeEngine grapeEngine = createGrapeEngine();
143144
grapeEngine.addResolver(createResolver("spring-releases", "https://repo.spring.io/release"));
144145
Map<String, Object> dependency = createDependency("io.spring.docresources", "spring-doc-resources",
145146
"0.1.1.RELEASE");
@@ -153,7 +154,7 @@ void differingTypeAndExt() {
153154
Map<String, Object> dependency = createDependency("org.grails", "grails-dependencies", "2.4.0");
154155
dependency.put("type", "foo");
155156
dependency.put("ext", "bar");
156-
AetherGrapeEngine grapeEngine = createGrapeEngine();
157+
GrapeEngine grapeEngine = createGrapeEngine();
157158
assertThatIllegalArgumentException().isThrownBy(() -> grapeEngine.grab(Collections.emptyMap(), dependency));
158159
}
159160

@@ -196,7 +197,7 @@ void resolutionWithClassifier() {
196197

197198
@SuppressWarnings("unchecked")
198199
private List<RemoteRepository> getRepositories() {
199-
AetherGrapeEngine grapeEngine = createGrapeEngine();
200+
GrapeEngine grapeEngine = createGrapeEngine();
200201
return (List<RemoteRepository>) ReflectionTestUtils.getField(grapeEngine, "repositories");
201202
}
202203

spring-boot-project/spring-boot-docs/src/docs/asciidoc/cli/maven-setting.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[cli.maven-setting]]
22
== Configuring the CLI with settings.xml
3-
The Spring Boot CLI uses Aether, Maven's dependency resolution engine, to resolve dependencies.
4-
The CLI makes use of the Maven configuration found in `~/.m2/settings.xml` to configure Aether.
3+
The Spring Boot CLI uses Maven Resolver, Maven's dependency resolution engine, to resolve dependencies.
4+
The CLI makes use of the Maven configuration found in `~/.m2/settings.xml` to configure Maven Resolver.
55
The following configuration settings are honored by the CLI:
66

77
* Offline

0 commit comments

Comments
 (0)