Java 类org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesResolver 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DependencyCustomizerTests.java   
@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    given(this.resolver.getGroupId("spring-boot-starter-logging"))
            .willReturn("org.springframework.boot");
    given(this.resolver.getArtifactId("spring-boot-starter-logging"))
            .willReturn("spring-boot-starter-logging");
    this.moduleNode.addClass(this.classNode);
    this.dependencyCustomizer = new DependencyCustomizer(
            new GroovyClassLoader(getClass().getClassLoader()), this.moduleNode,
            new DependencyResolutionContext() {

                @Override
                public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
                    return DependencyCustomizerTests.this.resolver;
                }

            });
}
项目:spring-boot-concourse    文件:DependencyCustomizerTests.java   
@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    given(this.resolver.getGroupId("spring-boot-starter-logging"))
            .willReturn("org.springframework.boot");
    given(this.resolver.getArtifactId("spring-boot-starter-logging"))
            .willReturn("spring-boot-starter-logging");
    this.moduleNode.addClass(this.classNode);
    this.dependencyCustomizer = new DependencyCustomizer(
            new GroovyClassLoader(getClass().getClassLoader()), this.moduleNode,
            new DependencyResolutionContext() {

                @Override
                public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
                    return DependencyCustomizerTests.this.resolver;
                }

            });
}
项目:contestparser    文件:DependencyCustomizerTests.java   
@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    given(this.resolver.getGroupId("spring-boot-starter-logging"))
            .willReturn("org.springframework.boot");
    given(this.resolver.getArtifactId("spring-boot-starter-logging"))
            .willReturn("spring-boot-starter-logging");
    this.moduleNode.addClass(this.classNode);
    this.dependencyCustomizer = new DependencyCustomizer(
            new GroovyClassLoader(getClass().getClassLoader()), this.moduleNode,
            new DependencyResolutionContext() {

                @Override
                public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
                    return DependencyCustomizerTests.this.resolver;
                }

            });
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DependencyCustomizer.java   
/**
 * Add a single dependency with the specified classifier and type and, optionally, all
 * of its dependencies. The group ID and version of the dependency are resolved from
 * the module by using the customizer's {@link ArtifactCoordinatesResolver}.
 * @param module The module ID
 * @param classifier The classifier, may be {@code null}
 * @param type The type, may be {@code null}
 * @param transitive {@code true} if the transitive dependencies should also be added,
 * otherwise {@code false}.
 * @return this {@link DependencyCustomizer} for continued use
 */
public DependencyCustomizer add(String module, String classifier, String type,
        boolean transitive) {
    if (canAdd()) {
        ArtifactCoordinatesResolver artifactCoordinatesResolver = this.dependencyResolutionContext
                .getArtifactCoordinatesResolver();
        this.classNode.addAnnotation(
                createGrabAnnotation(artifactCoordinatesResolver.getGroupId(module),
                        artifactCoordinatesResolver.getArtifactId(module),
                        artifactCoordinatesResolver.getVersion(module), classifier,
                        type, transitive));
    }
    return this;
}
项目:spring-boot-concourse    文件:DependencyCustomizer.java   
/**
 * Add a single dependency with the specified classifier and type and, optionally, all
 * of its dependencies. The group ID and version of the dependency are resolved from
 * the module by using the customizer's {@link ArtifactCoordinatesResolver}.
 * @param module The module ID
 * @param classifier The classifier, may be {@code null}
 * @param type The type, may be {@code null}
 * @param transitive {@code true} if the transitive dependencies should also be added,
 * otherwise {@code false}.
 * @return this {@link DependencyCustomizer} for continued use
 */
public DependencyCustomizer add(String module, String classifier, String type,
        boolean transitive) {
    if (canAdd()) {
        ArtifactCoordinatesResolver artifactCoordinatesResolver = this.dependencyResolutionContext
                .getArtifactCoordinatesResolver();
        this.classNode.addAnnotation(
                createGrabAnnotation(artifactCoordinatesResolver.getGroupId(module),
                        artifactCoordinatesResolver.getArtifactId(module),
                        artifactCoordinatesResolver.getVersion(module), classifier,
                        type, transitive));
    }
    return this;
}
项目:contestparser    文件:DependencyCustomizer.java   
/**
 * Add a single dependency with the specified classifier and type and, optionally, all
 * of its dependencies. The group ID and version of the dependency are resolved from
 * the module by using the customizer's {@link ArtifactCoordinatesResolver}.
 * @param module The module ID
 * @param classifier The classifier, may be {@code null}
 * @param type The type, may be {@code null}
 * @param transitive {@code true} if the transitive dependencies should also be added,
 * otherwise {@code false}.
 * @return this {@link DependencyCustomizer} for continued use
 */
public DependencyCustomizer add(String module, String classifier, String type,
        boolean transitive) {
    if (canAdd()) {
        ArtifactCoordinatesResolver artifactCoordinatesResolver = this.dependencyResolutionContext
                .getArtifactCoordinatesResolver();
        this.classNode.addAnnotation(
                createGrabAnnotation(artifactCoordinatesResolver.getGroupId(module),
                        artifactCoordinatesResolver.getArtifactId(module),
                        artifactCoordinatesResolver.getVersion(module), classifier,
                        type, transitive));
    }
    return this;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DependencyResolutionContext.java   
public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
    return this.artifactCoordinatesResolver;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ResolveDependencyCoordinatesTransformationTests.java   
@Override
public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
    return ResolveDependencyCoordinatesTransformationTests.this.coordinatesResolver;
}
项目:spring-boot-concourse    文件:DependencyResolutionContext.java   
public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
    return this.artifactCoordinatesResolver;
}
项目:spring-boot-concourse    文件:ResolveDependencyCoordinatesTransformationTests.java   
@Override
public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
    return ResolveDependencyCoordinatesTransformationTests.this.coordinatesResolver;
}
项目:contestparser    文件:DependencyResolutionContext.java   
public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
    return this.artifactCoordinatesResolver;
}
项目:contestparser    文件:ResolveDependencyCoordinatesTransformationTests.java   
@Override
public ArtifactCoordinatesResolver getArtifactCoordinatesResolver() {
    return ResolveDependencyCoordinatesTransformationTests.this.coordinatesResolver;
}