当前位置: 首页>>代码示例>>Java>>正文


Java DeploymentException类代码示例

本文整理汇总了Java中org.sonatype.aether.deployment.DeploymentException的典型用法代码示例。如果您正苦于以下问题:Java DeploymentException类的具体用法?Java DeploymentException怎么用?Java DeploymentException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DeploymentException类属于org.sonatype.aether.deployment包,在下文中一共展示了DeploymentException类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: publishArtifacts

import org.sonatype.aether.deployment.DeploymentException; //导入依赖的package包/类
@Override
protected void publishArtifacts(Collection<Artifact> artifacts, RepositorySystem repositorySystem, RepositorySystemSession session) throws DeploymentException {
    RemoteRepository gradleRepo = remoteRepository;
    if (artifacts.iterator().next().isSnapshot() && remoteSnapshotRepository != null) {
        gradleRepo = remoteSnapshotRepository;
    }
    if (gradleRepo == null) {
        throw new GradleException("Must specify a repository for deployment");
    }

    org.sonatype.aether.repository.RemoteRepository aetherRepo = createRepository(gradleRepo);

    DeployRequest request = new DeployRequest();
    request.setRepository(aetherRepo);
    for (Artifact artifact : artifacts) {
        request.addArtifact(artifact);
    }

    LOGGER.info("Deploying to {}", gradleRepo.getUrl());
    repositorySystem.deploy(session, request);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:22,代码来源:MavenDeployAction.java

示例2: deploy

import org.sonatype.aether.deployment.DeploymentException; //导入依赖的package包/类
/**
 * Uploads a collection of artifacts and their accompanying metadata to a remote repository.
 *
 * @param request The deployment request, must not be {@code null}.
 * @return The deployment result, never {@code null}.
 * @throws DeploymentException If any artifact/metadata from the request could not be deployed.
 */
public DeployResult deploy(DeployRequest request) throws DeploymentException {
    return repository.deploy(session, request);
}
 
开发者ID:cloudbees,项目名称:bees-maven-components,代码行数:11,代码来源:RepositoryService.java


注:本文中的org.sonatype.aether.deployment.DeploymentException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。