Java 类org.gradle.api.artifacts.repositories.MavenArtifactRepository 实例源码

项目:Reer    文件:MavenPublishPlugin.java   
private void createPublishTasksForEachMavenRepo(ModelMap<Task> tasks, PublishingExtension extension, final Task publishLifecycleTask, final MavenPublicationInternal publication,
                                                final String publicationName) {
    for (final MavenArtifactRepository repository : extension.getRepositories().withType(MavenArtifactRepository.class)) {
        final String repositoryName = repository.getName();

        String publishTaskName = "publish" + capitalize(publicationName) + "PublicationTo" + capitalize(repositoryName) + "Repository";

        tasks.create(publishTaskName, PublishToMavenRepository.class, new Action<PublishToMavenRepository>() {
            public void execute(PublishToMavenRepository publishTask) {
                publishTask.setPublication(publication);
                publishTask.setRepository(repository);
                publishTask.setGroup(PublishingPlugin.PUBLISH_TASK_GROUP);
                publishTask.setDescription("Publishes Maven publication '" + publicationName + "' to Maven repository '" + repositoryName + "'.");

            }
        });
        publishLifecycleTask.dependsOn(publishTaskName);
    }
}
项目:Reer    文件:PluginResolutionServiceResolver.java   
private ClassPath resolvePluginDependencies(final PluginUseMetaData metadata) {
    DependencyResolutionServices resolution = dependencyResolutionServicesFactory.create();

    RepositoryHandler repositories = resolution.getResolveRepositoryHandler();
    final String repoUrl = metadata.implementation.get("repo");
    repositories.maven(new Action<MavenArtifactRepository>() {
        public void execute(MavenArtifactRepository mavenArtifactRepository) {
            mavenArtifactRepository.setUrl(repoUrl);
        }
    });

    Dependency dependency = resolution.getDependencyHandler().create(metadata.implementation.get("gav"));

    ConfigurationContainerInternal configurations = (ConfigurationContainerInternal) resolution.getConfigurationContainer();
    ConfigurationInternal configuration = configurations.detachedConfiguration(dependency);

    try {
        Set<File> files = configuration.getResolvedConfiguration().getFiles(Specs.satisfyAll());
        return new DefaultClassPath(files);
    } catch (ResolveException e) {
        throw new DependencyResolutionException("Failed to resolve all plugin dependencies from " + repoUrl, e.getCause());
    }
}
项目:Reer    文件:DefaultMavenPluginRepository.java   
@Override
protected ArtifactRepository internalCreateArtifactRepository(RepositoryHandler repositoryHandler) {
    return repositoryHandler.maven(new Action<MavenArtifactRepository>() {
        @Override
        public void execute(MavenArtifactRepository mavenArtifactRepository) {
            mavenArtifactRepository.setName(getArtifactRepositoryName());
            mavenArtifactRepository.setUrl(getUrl());
            Credentials credentials = authenticationSupport().getConfiguredCredentials();
            if (credentials != null) {
                ((AuthenticationSupportedInternal)mavenArtifactRepository).setConfiguredCredentials(credentials);
                mavenArtifactRepository.authentication(new Action<AuthenticationContainer>() {
                    @Override
                    public void execute(AuthenticationContainer authenticationContainer) {
                        authenticationContainer.addAll(authenticationSupport().getConfiguredAuthentication());
                    }
                });
            }
        }
    });
}
项目:intellij-ce-playground    文件:BaseComponentModelPlugin.java   
@Mutate
public void createAndroidTasks(
        ModelMap<Task> tasks,
        ModelMap<AndroidComponentSpec> androidSpecs,
        TaskManager taskManager,
        SdkHandler sdkHandler,
        Project project, AndroidComponentModelSourceSet androidSources) {
    // setup SDK repositories.
    for (final File file : sdkHandler.getSdkLoader().getRepositories()) {
        project.getRepositories().maven(new Action<MavenArtifactRepository>() {
            @Override
            public void execute(MavenArtifactRepository repo) {
                repo.setUrl(file.toURI());
            }
        });
    }
    // TODO: determine how to provide functionalities of variant API objects.
}
项目:Pushjet-Android    文件:MavenPublishPlugin.java   
private void createPublishTasksForEachMavenRepo(CollectionBuilder<Task> tasks, PublishingExtension extension, final Task publishLifecycleTask, final MavenPublicationInternal publication,
                                                final String publicationName) {
    for (final MavenArtifactRepository repository : extension.getRepositories().withType(MavenArtifactRepository.class)) {
        final String repositoryName = repository.getName();

        String publishTaskName = String.format("publish%sPublicationTo%sRepository", capitalize(publicationName), capitalize(repositoryName));

        tasks.create(publishTaskName, PublishToMavenRepository.class, new Action<PublishToMavenRepository>() {
            public void execute(PublishToMavenRepository publishTask) {
                publishTask.setPublication(publication);
                publishTask.setRepository(repository);
                publishTask.setGroup(PublishingPlugin.PUBLISH_TASK_GROUP);
                publishTask.setDescription(String.format("Publishes Maven publication '%s' to Maven repository '%s'.", publicationName, repositoryName));

                //Because dynamic rules are not yet implemented we have to violate input immutability here as an interim step
                publishLifecycleTask.dependsOn(publishTask);
            }
        });
    }
}
项目:Pushjet-Android    文件:PluginResolutionServiceResolver.java   
private ClassPath resolvePluginDependencies(final PluginUseMetaData metadata) {
    DependencyResolutionServices resolution = dependencyResolutionServicesFactory.create();

    RepositoryHandler repositories = resolution.getResolveRepositoryHandler();
    final String repoUrl = metadata.implementation.get("repo");
    repositories.maven(new Action<MavenArtifactRepository>() {
        public void execute(MavenArtifactRepository mavenArtifactRepository) {
            mavenArtifactRepository.setUrl(repoUrl);
        }
    });

    Dependency dependency = resolution.getDependencyHandler().create(metadata.implementation.get("gav"));

    ConfigurationContainerInternal configurations = (ConfigurationContainerInternal) resolution.getConfigurationContainer();
    ConfigurationInternal configuration = configurations.detachedConfiguration(dependency);

    try {
        Set<File> files = configuration.getResolvedConfiguration().getFiles(Specs.satisfyAll());
        return new DefaultClassPath(files);
    } catch (ResolveException e) {
        throw new DependencyResolutionException("Failed to resolve all plugin dependencies from " + repoUrl, e.getCause());
    }
}
项目:Pushjet-Android    文件:DefaultRepositoryHandler.java   
public DependencyResolver mavenRepo(Map<String, ?> args, Closure configClosure) {
    DeprecationLogger.nagUserOfReplacedMethod("RepositoryHandler.mavenRepo()", "maven()");
    Map<String, Object> modifiedArgs = new HashMap<String, Object>(args);
    if (modifiedArgs.containsKey("urls")) {
        List<?> urls = flattenCollections(modifiedArgs.remove("urls"));
        if (!urls.isEmpty()) {
            modifiedArgs.put("url", urls.get(0));
            List<?> extraUrls = urls.subList(1, urls.size());
            modifiedArgs.put("artifactUrls", extraUrls);
        }
    }

    MavenArtifactRepository repository = repositoryFactory.createMavenRepository();
    ConfigureUtil.configureByMap(modifiedArgs, repository);
    DependencyResolver resolver = repositoryFactory.toResolver(repository);
    ConfigureUtil.configure(configClosure, resolver);
    addRepository(repositoryFactory.createResolverBackedRepository(resolver), "mavenRepo");
    return resolver;
}
项目:Reer    文件:PublishToMavenRepository.java   
@TaskAction
public void publish() {
    MavenPublicationInternal publicationInternal = getPublicationInternal();
    if (publicationInternal == null) {
        throw new InvalidUserDataException("The 'publication' property is required");
    }

    MavenArtifactRepository repository = getRepository();
    if (repository == null) {
        throw new InvalidUserDataException("The 'repository' property is required");
    }

    doPublish(publicationInternal, repository);
}
项目:Reer    文件:PublishToMavenRepository.java   
private void doPublish(final MavenPublicationInternal publication, final MavenArtifactRepository repository) {
    new PublishOperation(publication, repository.getName()) {
        @Override
        protected void publish() throws Exception {
            MavenPublisher remotePublisher = new MavenRemotePublisher(getLoggingManagerFactory(), getMavenRepositoryLocator(), getTemporaryDirFactory(), getRepositoryTransportFactory());
            MavenPublisher staticLockingPublisher = new StaticLockingMavenPublisher(remotePublisher);
            MavenPublisher validatingPublisher = new ValidatingMavenPublisher(staticLockingPublisher);
            validatingPublisher.publish(publication.asNormalisedPublication(), repository);
        }
    }.run();
}
项目:Reer    文件:MavenRemotePublisher.java   
public GradleWagonMavenDeployAction(File pomFile, MavenArtifactRepository artifactRepository, RepositoryTransportFactory repositoryTransportFactory) {
    super(pomFile, null);
    this.artifactRepository = artifactRepository;
    this.repositoryTransportFactory = repositoryTransportFactory;

    registerWagonProtocols();
}
项目:Reer    文件:ValidatingMavenPublisher.java   
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    validateIdentity(publication);
    validateArtifacts(publication);
    checkNoDuplicateArtifacts(publication);

    delegate.publish(publication, artifactRepository);
}
项目:Reer    文件:StaticLockingMavenPublisher.java   
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    STATIC_LOCK.lock();
    try {
        delegate.publish(publication, artifactRepository);
    } finally {
        STATIC_LOCK.unlock();
    }
}
项目:Reer    文件:JavaScriptRepositoriesExtension.java   
public MavenArtifactRepository gradle(final Action<? super MavenArtifactRepository> action) {
    return repositories.maven(new Action<MavenArtifactRepository>() {
        public void execute(MavenArtifactRepository repository) {
            repository.setName("gradleJs");
            repository.setUrl(GRADLE_PUBLIC_JAVASCRIPT_REPO_URL);
            action.execute(repository);
        }
    });
}
项目:Reer    文件:DefaultGradlePluginPortal.java   
@Override
public ArtifactRepository createArtifactRepository(RepositoryHandler repositoryHandler) {
    return repositoryHandler.maven(new Action<MavenArtifactRepository>() {
        @Override
        public void execute(MavenArtifactRepository mavenArtifactRepository) {
            mavenArtifactRepository.setUrl("https://plugins.gradle.org/m2");
        }
    });
}
项目:Reer    文件:DefaultBaseRepositoryFactory.java   
public MavenArtifactRepository createMavenLocalRepository() {
    MavenArtifactRepository mavenRepository = instantiator.newInstance(DefaultMavenLocalArtifactRepository.class, fileResolver, transportFactory,
            locallyAvailableResourceFinder, instantiator, artifactFileStore, pomParser, createAuthenticationContainer());
    final File localMavenRepository = localMavenRepositoryLocator.getLocalMavenRepository();
    mavenRepository.setUrl(localMavenRepository);
    return mavenRepository;
}
项目:atlas    文件:PublishToMavenRepositoryHook.java   
@TaskAction
public void publish() {

    MavenPublicationInternal publicationInternal = getPublicationInternal();
    if (publicationInternal == null) {
        throw new InvalidUserDataException("The 'publication' property is required");
    }

    MavenArtifactRepository repository = getRepository();
    if (repository == null) {
        throw new InvalidUserDataException("The 'repository' property is required");
    }

    doPublish(publicationInternal, repository);
}
项目:Pushjet-Android    文件:PublishToMavenLocal.java   
@Override
public MavenArtifactRepository getRepository() {
    if (super.getRepository() == null) {
        // Instantiate the default MavenLocal repository if none has been set explicitly
        MavenArtifactRepository mavenLocalRepository = getBaseRepositoryFactory().createMavenLocalRepository();
        mavenLocalRepository.setName(ArtifactRepositoryContainer.DEFAULT_MAVEN_LOCAL_REPO_NAME);
        setRepository(mavenLocalRepository);
    }

    return super.getRepository();
}
项目:Pushjet-Android    文件:PublishToMavenLocal.java   
@Override
protected void doPublish(final MavenPublicationInternal publication, final MavenArtifactRepository repository) {
    new PublishOperation(publication, repository) {
        @Override
        protected void publish() throws Exception {
            MavenPublisher antBackedPublisher = new AntTaskBackedMavenLocalPublisher(getLoggingManagerFactory(), getTemporaryDirFactory());
            MavenPublisher staticLockingPublisher = new StaticLockingMavenPublisher(antBackedPublisher);
            MavenPublisher validatingPublisher = new ValidatingMavenPublisher(staticLockingPublisher);
            validatingPublisher.publish(publication.asNormalisedPublication(), repository);
        }
    }.run();
}
项目:Pushjet-Android    文件:PublishToMavenRepository.java   
@TaskAction
public void publish() {
    MavenPublicationInternal publicationInternal = getPublicationInternal();
    if (publicationInternal == null) {
        throw new InvalidUserDataException("The 'publication' property is required");
    }

    MavenArtifactRepository repository = getRepository();
    if (repository == null) {
        throw new InvalidUserDataException("The 'repository' property is required");
    }

    doPublish(publicationInternal, repository);
}
项目:Pushjet-Android    文件:PublishToMavenRepository.java   
protected void doPublish(final MavenPublicationInternal publication, final MavenArtifactRepository repository) {
    new PublishOperation(publication, repository) {
        @Override
        protected void publish() throws Exception {
            MavenPublisher antBackedPublisher = new AntTaskBackedMavenPublisher(getLoggingManagerFactory(), getTemporaryDirFactory());
            MavenPublisher staticLockingPublisher = new StaticLockingMavenPublisher(antBackedPublisher);
            MavenPublisher validatingPublisher = new ValidatingMavenPublisher(staticLockingPublisher);
            validatingPublisher.publish(publication.asNormalisedPublication(), repository);
        }
    }.run();
}
项目:Pushjet-Android    文件:ValidatingMavenPublisher.java   
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    validateIdentity(publication);
    validateArtifacts(publication);
    checkNoDuplicateArtifacts(publication);

    delegate.publish(publication, artifactRepository);
}
项目:Pushjet-Android    文件:StaticLockingMavenPublisher.java   
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    STATIC_LOCK.lock();
    try {
        delegate.publish(publication, artifactRepository);
    } finally {
        STATIC_LOCK.unlock();
    }
}
项目:Pushjet-Android    文件:AbstractAntTaskBackedMavenPublisher.java   
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    logger.info("Publishing to repository {}", artifactRepository);
    T deployTask = createDeployTask();
    deployTask.setProject(AntUtil.createProject());

    MavenSettingsSupplier mavenSettingsSupplier = new EmptyMavenSettingsSupplier();
    mavenSettingsSupplier.supply(deployTask);

    postConfigure(deployTask, artifactRepository);
    addPomAndArtifacts(deployTask, publication);
    execute(deployTask);

    mavenSettingsSupplier.done();
}
项目:Pushjet-Android    文件:JavaScriptRepositoriesExtension.java   
public MavenArtifactRepository gradle(final Action<? super MavenArtifactRepository> action) {
    return repositories.maven(new Action<MavenArtifactRepository>() {
        public void execute(MavenArtifactRepository repository) {
            repository.setName("gradleJs");
            repository.setUrl(GRADLE_PUBLIC_JAVASCRIPT_REPO_URL);
            action.execute(repository);
        }
    });
}
项目:Pushjet-Android    文件:DefaultBaseRepositoryFactory.java   
public MavenArtifactRepository createMavenLocalRepository() {
    MavenArtifactRepository mavenRepository = instantiator.newInstance(DefaultMavenLocalArtifactRepository.class, fileResolver, createPasswordCredentials(), transportFactory,
            locallyAvailableResourceFinder, artifactFileStore);
    final File localMavenRepository = localMavenRepositoryLocator.getLocalMavenRepository();
    mavenRepository.setUrl(localMavenRepository);
    return mavenRepository;
}
项目:Pushjet-Android    文件:PublishToMavenLocal.java   
@Override
public MavenArtifactRepository getRepository() {
    if (super.getRepository() == null) {
        // Instantiate the default MavenLocal repository if none has been set explicitly
        MavenArtifactRepository mavenLocalRepository = baseRepositoryFactory.createMavenLocalRepository();
        mavenLocalRepository.setName(ArtifactRepositoryContainer.DEFAULT_MAVEN_LOCAL_REPO_NAME);
        setRepository(mavenLocalRepository);
    }

    return super.getRepository();
}
项目:Pushjet-Android    文件:PublishToMavenLocal.java   
@Override
protected void doPublish(final MavenPublicationInternal publication, final MavenArtifactRepository repository) {
    new PublishOperation(publication, repository) {
        @Override
        protected void publish() throws Exception {
            MavenPublisher antBackedPublisher = new AntTaskBackedMavenLocalPublisher(getLoggingManagerFactory(), getTemporaryDirFactory());
            MavenPublisher staticLockingPublisher = new StaticLockingMavenPublisher(antBackedPublisher);
            MavenPublisher validatingPublisher = new ValidatingMavenPublisher(staticLockingPublisher);
            validatingPublisher.publish(publication.asNormalisedPublication(), repository);
        }
    }.run();
}
项目:Pushjet-Android    文件:PublishToMavenRepository.java   
@TaskAction
public void publish() {
    MavenPublicationInternal publicationInternal = getPublicationInternal();
    if (publicationInternal == null) {
        throw new InvalidUserDataException("The 'publication' property is required");
    }

    MavenArtifactRepository repository = getRepository();
    if (repository == null) {
        throw new InvalidUserDataException("The 'repository' property is required");
    }

    doPublish(publicationInternal, repository);
}
项目:Pushjet-Android    文件:PublishToMavenRepository.java   
protected void doPublish(final MavenPublicationInternal publication, final MavenArtifactRepository repository) {
    new PublishOperation(publication, repository) {
        @Override
        protected void publish() throws Exception {
            MavenPublisher antBackedPublisher = new AntTaskBackedMavenPublisher(loggingManagerFactory, getTemporaryDirFactory());
            MavenPublisher staticLockingPublisher = new StaticLockingMavenPublisher(antBackedPublisher);
            MavenPublisher validatingPublisher = new ValidatingMavenPublisher(staticLockingPublisher);
            validatingPublisher.publish(publication.asNormalisedPublication(), repository);
        }
    }.run();
}
项目:Pushjet-Android    文件:MavenPublishTaskModelRule.java   
private void createPublishTasksForEachMavenRepo(TaskContainer tasks, PublishingExtension extension, MavenPublicationInternal publication, String publicationName) {
    for (MavenArtifactRepository repository : extension.getRepositories().withType(MavenArtifactRepository.class)) {
        String repositoryName = repository.getName();

        String publishTaskName = String.format("publish%sPublicationTo%sRepository", capitalize(publicationName), capitalize(repositoryName));

        PublishToMavenRepository publishTask = tasks.create(publishTaskName, PublishToMavenRepository.class);
        publishTask.setPublication(publication);
        publishTask.setRepository(repository);
        publishTask.setGroup(PublishingPlugin.PUBLISH_TASK_GROUP);
        publishTask.setDescription(String.format("Publishes Maven publication '%s' to Maven repository '%s'.", publicationName, repositoryName));

        publishLifecycleTask.dependsOn(publishTask);
    }
}
项目:Pushjet-Android    文件:ValidatingMavenPublisher.java   
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    validateIdentity(publication);
    validateArtifacts(publication);
    checkNoDuplicateArtifacts(publication);

    delegate.publish(publication, artifactRepository);
}
项目:Pushjet-Android    文件:StaticLockingMavenPublisher.java   
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    STATIC_LOCK.lock();
    try {
        delegate.publish(publication, artifactRepository);
    } finally {
        STATIC_LOCK.unlock();
    }
}
项目:Pushjet-Android    文件:AbstractAntTaskBackedMavenPublisher.java   
public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    logger.info("Publishing to repository {}", artifactRepository);
    T deployTask = createDeployTask();
    deployTask.setProject(AntUtil.createProject());

    MavenSettingsSupplier mavenSettingsSupplier = new EmptyMavenSettingsSupplier();
    mavenSettingsSupplier.supply(deployTask);

    postConfigure(deployTask, artifactRepository);
    addPomAndArtifacts(deployTask, publication);
    execute(deployTask);

    mavenSettingsSupplier.done();
}
项目:Pushjet-Android    文件:JavaScriptRepositoriesExtension.java   
public MavenArtifactRepository gradle(final Action<? super MavenArtifactRepository> action) {
    return repositories.maven(new Action<MavenArtifactRepository>() {
        public void execute(MavenArtifactRepository repository) {
            repository.setName("gradleJs");
            repository.setUrl(GRADLE_PUBLIC_JAVASCRIPT_REPO_URL);
            action.execute(repository);
        }
    });
}
项目:Pushjet-Android    文件:DefaultRepositoryHandler.java   
public MavenArtifactRepository mavenCentral(Map<String, ?> args) {
    Map<String, Object> modifiedArgs = new HashMap<String, Object>(args);
    if (modifiedArgs.containsKey("urls")) {
        DeprecationLogger.nagUserOfDeprecated(
                "The 'urls' property of the RepositoryHandler.mavenCentral() method",
                "You should use the 'artifactUrls' property to define additional artifact locations"
        );
        List<?> urls = flattenCollections(modifiedArgs.remove("urls"));
        modifiedArgs.put("artifactUrls", urls);
    }

    return addRepository(repositoryFactory.createMavenCentralRepository(), DEFAULT_MAVEN_CENTRAL_REPO_NAME, new ConfigureByMapAction<MavenArtifactRepository>(modifiedArgs));
}
项目:ARCHIVE-wildfly-swarm    文件:GradleArtifactResolvingHelper.java   
public GradleArtifactResolvingHelper(Project project) {
    this.project = project;
    this.project.getRepositories().maven(new Action<MavenArtifactRepository>() {
        @Override
        public void execute(MavenArtifactRepository repo) {
            repo.setName("jboss-public");
            repo.setUrl("http://repository.jboss.org/nexus/content/groups/public/");
        }
    });
}
项目:aether-gradle-plugin    文件:VersionResolverDependencyResolveDetails.java   
@Override
public void execute(DependencyResolveDetails dependencyResolveDetails) {
    String group = dependencyResolveDetails.getTarget().getGroup();
    String name = dependencyResolveDetails.getTarget().getName();
    if (aetherPlugin.getVersionMap().containsKey(group) && aetherPlugin.getVersionMap().get(group).containsKey(name)) {
        if (dependencyResolveDetails.getRequested().getVersion().equals(dependencyResolveDetails.getTarget().getVersion())) {
            dependencyResolveDetails.useVersion(aetherPlugin.getVersionMap().get(group).get(name));
        }
    } else {
        RepositorySystem system = setupRepositorySystem();
        RepositorySystemSession session = setupSession(project, system);
        List<RemoteRepository> remoteRepositories = new ArrayList<>();
        for (ArtifactRepository artifactRepository : project.getRepositories()) {
            if (artifactRepository instanceof MavenArtifactRepository) {
                MavenArtifactRepository mavenArtifactRepository = (MavenArtifactRepository) artifactRepository;
                remoteRepositories.add(new RemoteRepository.Builder(mavenArtifactRepository.getName(), "default", mavenArtifactRepository.getUrl().toString()).build());
            }
        }
        Artifact artifact = new DefaultArtifact(dependencyResolveDetails.getTarget().getGroup()
                + ":" + dependencyResolveDetails.getTarget().getName()
                + ":" + dependencyResolveDetails.getTarget().getVersion());

        CollectRequest collectRequest = new CollectRequest();
        String scope;
        if (configuration.getName().contains("test")) {
            scope = JavaScopes.TEST;
        } else if (configuration.getName().contains("runtime")) {
            scope = JavaScopes.RUNTIME;
        } else if (configuration.getName().equals("providedCompile")
                || configuration.getName().equals("compileOnly")) {
            scope = JavaScopes.PROVIDED;
        } else
            scope = JavaScopes.COMPILE;
        collectRequest.setRoot(new Dependency(artifact, scope));
        collectRequest.setRepositories(remoteRepositories);

        try {
            CollectResult collectResult = system.collectDependencies(session, collectRequest);
            processDependencyNode(collectResult.getRoot());
        } catch (DependencyCollectionException e) {
            e.printStackTrace();
        }
    }
}
项目:Reer    文件:MavenRemotePublisher.java   
protected MavenPublishAction createDeployTask(File pomFile, LocalMavenRepositoryLocator mavenRepositoryLocator, MavenArtifactRepository artifactRepository) {
    GradleWagonMavenDeployAction deployTask = new GradleWagonMavenDeployAction(pomFile, artifactRepository, repositoryTransportFactory);
    deployTask.setLocalMavenRepositoryLocation(temporaryDirFactory.create());
    deployTask.setRepositories(createMavenRemoteRepository(artifactRepository), null);
    return deployTask;
}
项目:Reer    文件:MavenRemotePublisher.java   
private RemoteRepository createMavenRemoteRepository(MavenArtifactRepository repository) {
    RemoteRepository remoteRepository = new RemoteRepository();
    remoteRepository.setUrl(repository.getUrl().toString());
    return remoteRepository;
}
项目:Reer    文件:MavenRemotePublisher.java   
private RepositoryTransportWagonAdapter createAdapter(String protocol, MavenArtifactRepository artifactRepository, RepositoryTransportFactory repositoryTransportFactory) {
    RepositoryTransport transport = repositoryTransportFactory.createTransport(protocol, artifactRepository.getName(),
            ((AuthenticationSupportedInternal)artifactRepository).getConfiguredAuthentication());
    URI rootUri = artifactRepository.getUrl();
    return new RepositoryTransportWagonAdapter(transport, rootUri);
}