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

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DependencyResolutionContext.java   
public void addDependencyManagement(DependencyManagement dependencyManagement) {
    for (org.springframework.boot.cli.compiler.dependencies.Dependency dependency : dependencyManagement
            .getDependencies()) {
        List<Exclusion> aetherExclusions = new ArrayList<Exclusion>();
        for (org.springframework.boot.cli.compiler.dependencies.Dependency.Exclusion exclusion : dependency
                .getExclusions()) {
            aetherExclusions.add(new Exclusion(exclusion.getGroupId(),
                    exclusion.getArtifactId(), "*", "*"));
        }
        Dependency aetherDependency = new Dependency(
                new DefaultArtifact(dependency.getGroupId(),
                        dependency.getArtifactId(), "jar", dependency.getVersion()),
                JavaScopes.COMPILE, false, aetherExclusions);
        this.managedDependencies.add(0, aetherDependency);
        this.managedDependencyByGroupAndArtifact.put(getIdentifier(aetherDependency),
                aetherDependency);
    }
    this.dependencyManagement = this.dependencyManagement == null
            ? dependencyManagement
            : new CompositeDependencyManagement(dependencyManagement,
                    this.dependencyManagement);
    this.artifactCoordinatesResolver = new DependencyManagementArtifactCoordinatesResolver(
            this.dependencyManagement);
}
项目:spring-boot-concourse    文件:DependencyResolutionContext.java   
public void addDependencyManagement(DependencyManagement dependencyManagement) {
    for (org.springframework.boot.cli.compiler.dependencies.Dependency dependency : dependencyManagement
            .getDependencies()) {
        List<Exclusion> aetherExclusions = new ArrayList<Exclusion>();
        for (org.springframework.boot.cli.compiler.dependencies.Dependency.Exclusion exclusion : dependency
                .getExclusions()) {
            aetherExclusions.add(new Exclusion(exclusion.getGroupId(),
                    exclusion.getArtifactId(), "*", "*"));
        }
        Dependency aetherDependency = new Dependency(
                new DefaultArtifact(dependency.getGroupId(),
                        dependency.getArtifactId(), "jar", dependency.getVersion()),
                JavaScopes.COMPILE, false, aetherExclusions);
        this.managedDependencies.add(0, aetherDependency);
        this.managedDependencyByGroupAndArtifact.put(getIdentifier(aetherDependency),
                aetherDependency);
    }
    this.dependencyManagement = this.dependencyManagement == null
            ? dependencyManagement
            : new CompositeDependencyManagement(dependencyManagement,
                    this.dependencyManagement);
    this.artifactCoordinatesResolver = new DependencyManagementArtifactCoordinatesResolver(
            this.dependencyManagement);
}
项目:contestparser    文件:DependencyResolutionContext.java   
public void addDependencyManagement(DependencyManagement dependencyManagement) {
    for (org.springframework.boot.cli.compiler.dependencies.Dependency dependency : dependencyManagement
            .getDependencies()) {
        List<Exclusion> aetherExclusions = new ArrayList<Exclusion>();
        for (org.springframework.boot.cli.compiler.dependencies.Dependency.Exclusion exclusion : dependency
                .getExclusions()) {
            aetherExclusions.add(new Exclusion(exclusion.getGroupId(),
                    exclusion.getArtifactId(), "*", "*"));
        }
        Dependency aetherDependency = new Dependency(
                new DefaultArtifact(dependency.getGroupId(),
                        dependency.getArtifactId(), "jar", dependency.getVersion()),
                JavaScopes.COMPILE, false, aetherExclusions);
        this.managedDependencies.add(0, aetherDependency);
        this.managedDependencyByGroupAndArtifact.put(getIdentifier(aetherDependency),
                aetherDependency);
    }
    this.dependencyManagement = this.dependencyManagement == null
            ? dependencyManagement
            : new CompositeDependencyManagement(dependencyManagement,
                    this.dependencyManagement);
    this.artifactCoordinatesResolver = new DependencyManagementArtifactCoordinatesResolver(
            this.dependencyManagement);
}