mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-05-02 19:30:23 +01:00
Fix grape -> compiler package tangle
Fix package tangle by moving DependencyResolutionContext from the compiler package to grape. See gh-1004
This commit is contained in:
+1
@@ -23,6 +23,7 @@ import org.codehaus.groovy.ast.ClassNode;
|
||||
import org.codehaus.groovy.ast.ModuleNode;
|
||||
import org.codehaus.groovy.control.SourceUnit;
|
||||
import org.codehaus.groovy.transform.ASTTransformation;
|
||||
import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
|
||||
|
||||
/**
|
||||
* {@link ASTTransformation} to apply
|
||||
|
||||
+1
@@ -24,6 +24,7 @@ import org.codehaus.groovy.ast.ClassNode;
|
||||
import org.codehaus.groovy.ast.ModuleNode;
|
||||
import org.codehaus.groovy.ast.expr.ConstantExpression;
|
||||
import org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesResolver;
|
||||
import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
|
||||
|
||||
/**
|
||||
* Customizer that allows dependencies to be added during compilation. Adding a dependency
|
||||
|
||||
+1
@@ -38,6 +38,7 @@ import org.codehaus.groovy.control.messages.Message;
|
||||
import org.codehaus.groovy.control.messages.SyntaxErrorMessage;
|
||||
import org.codehaus.groovy.syntax.SyntaxException;
|
||||
import org.codehaus.groovy.transform.ASTTransformation;
|
||||
import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
|
||||
import org.springframework.boot.dependency.tools.ManagedDependencies;
|
||||
import org.springframework.boot.dependency.tools.PropertiesFileManagedDependencies;
|
||||
import org.springframework.boot.dependency.tools.VersionManagedDependencies;
|
||||
|
||||
+1
@@ -44,6 +44,7 @@ import org.codehaus.groovy.transform.ASTTransformation;
|
||||
import org.codehaus.groovy.transform.ASTTransformationVisitor;
|
||||
import org.springframework.boot.cli.compiler.grape.AetherGrapeEngine;
|
||||
import org.springframework.boot.cli.compiler.grape.AetherGrapeEngineFactory;
|
||||
import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
|
||||
import org.springframework.boot.cli.compiler.grape.GrapeEngineInstaller;
|
||||
import org.springframework.boot.cli.util.ResourceUtils;
|
||||
|
||||
|
||||
+1
@@ -28,6 +28,7 @@ import org.codehaus.groovy.ast.AnnotationNode;
|
||||
import org.codehaus.groovy.ast.expr.ConstantExpression;
|
||||
import org.codehaus.groovy.ast.expr.Expression;
|
||||
import org.codehaus.groovy.transform.ASTTransformation;
|
||||
import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
|
||||
|
||||
/**
|
||||
* {@link ASTTransformation} to resolve {@link Grab} artifact coordinates.
|
||||
|
||||
-1
@@ -43,7 +43,6 @@ import org.eclipse.aether.resolution.DependencyRequest;
|
||||
import org.eclipse.aether.resolution.DependencyResult;
|
||||
import org.eclipse.aether.util.artifact.JavaScopes;
|
||||
import org.eclipse.aether.util.filter.DependencyFilterUtils;
|
||||
import org.springframework.boot.cli.compiler.DependencyResolutionContext;
|
||||
|
||||
/**
|
||||
* A {@link GrapeEngine} implementation that uses <a
|
||||
|
||||
-1
@@ -35,7 +35,6 @@ import org.eclipse.aether.spi.connector.transport.TransporterFactory;
|
||||
import org.eclipse.aether.spi.locator.ServiceLocator;
|
||||
import org.eclipse.aether.transport.file.FileTransporterFactory;
|
||||
import org.eclipse.aether.transport.http.HttpTransporterFactory;
|
||||
import org.springframework.boot.cli.compiler.DependencyResolutionContext;
|
||||
|
||||
/**
|
||||
* Utility class to create a pre-configured {@link AetherGrapeEngine}.
|
||||
|
||||
+5
-6
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.cli.compiler;
|
||||
package org.springframework.boot.cli.compiler.grape;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -22,7 +22,6 @@ import java.util.List;
|
||||
import org.eclipse.aether.graph.Dependency;
|
||||
import org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesResolver;
|
||||
import org.springframework.boot.cli.compiler.dependencies.ManagedDependenciesArtifactCoordinatesResolver;
|
||||
import org.springframework.boot.cli.compiler.grape.ManagedDependenciesFactory;
|
||||
import org.springframework.boot.dependency.tools.ManagedDependencies;
|
||||
|
||||
/**
|
||||
@@ -41,20 +40,20 @@ public class DependencyResolutionContext {
|
||||
this(new ManagedDependenciesArtifactCoordinatesResolver());
|
||||
}
|
||||
|
||||
DependencyResolutionContext(ArtifactCoordinatesResolver artifactCoordinatesResolver) {
|
||||
public DependencyResolutionContext(
|
||||
ArtifactCoordinatesResolver artifactCoordinatesResolver) {
|
||||
this.artifactCoordinatesResolver = artifactCoordinatesResolver;
|
||||
}
|
||||
|
||||
void setManagedDependencies(ManagedDependencies managedDependencies) {
|
||||
public void setManagedDependencies(ManagedDependencies managedDependencies) {
|
||||
this.artifactCoordinatesResolver = new ManagedDependenciesArtifactCoordinatesResolver(
|
||||
managedDependencies);
|
||||
this.managedDependencies = new ArrayList<Dependency>(
|
||||
new ManagedDependenciesFactory(managedDependencies)
|
||||
.getManagedDependencies());
|
||||
|
||||
}
|
||||
|
||||
ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
|
||||
public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
|
||||
return this.artifactCoordinatesResolver;
|
||||
}
|
||||
|
||||
+1
@@ -31,6 +31,7 @@ import org.junit.Test;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesResolver;
|
||||
import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
+1
@@ -43,6 +43,7 @@ import org.codehaus.groovy.transform.ASTTransformation;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesResolver;
|
||||
import org.springframework.boot.cli.compiler.grape.DependencyResolutionContext;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ import java.util.Map;
|
||||
import org.eclipse.aether.DefaultRepositorySystemSession;
|
||||
import org.eclipse.aether.util.repository.JreProxySelector;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.cli.compiler.DependencyResolutionContext;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
Reference in New Issue
Block a user