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


Java DistributionManagement.setRepository方法代码示例

本文整理汇总了Java中org.apache.maven.model.DistributionManagement.setRepository方法的典型用法代码示例。如果您正苦于以下问题:Java DistributionManagement.setRepository方法的具体用法?Java DistributionManagement.setRepository怎么用?Java DistributionManagement.setRepository使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.model.DistributionManagement的用法示例。


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

示例1: addDistributionManagement

import org.apache.maven.model.DistributionManagement; //导入方法依赖的package包/类
public static void addDistributionManagement(Model pomModel) {
    DistributionManagement distributionManagement = new DistributionManagement();

    DeploymentRepository releaseRepo = new DeploymentRepository();
    releaseRepo.setId("repo.spring.io");
    releaseRepo.setName("Spring Release Repository");
    releaseRepo.setUrl("https://repo.spring.io/libs-release-local");
    distributionManagement.setRepository(releaseRepo);

    DeploymentRepository snapshotRepo = new DeploymentRepository();
    snapshotRepo.setId("repo.spring.io");
    snapshotRepo.setName("Spring Snapshot Repository");
    snapshotRepo.setUrl("https://repo.spring.io/libs-snapshot-local");
    distributionManagement.setSnapshotRepository(snapshotRepo);

    pomModel.setDistributionManagement(distributionManagement);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-stream-app-maven-plugin,代码行数:18,代码来源:MavenModelUtils.java

示例2: addProfiles

import org.apache.maven.model.DistributionManagement; //导入方法依赖的package包/类
public static void addProfiles(Model pomModel) {
    Profile profile = new Profile();
    profile.setId("milestone");
    DistributionManagement milestoneDistManagement = new DistributionManagement();

    DeploymentRepository milestoneRepo = new DeploymentRepository();
    milestoneRepo.setId("repo.spring.io");
    milestoneRepo.setName("Spring Milestone Repository");
    milestoneRepo.setUrl("https://repo.spring.io/libs-milestone-local");
    milestoneDistManagement.setRepository(milestoneRepo);
    profile.setDistributionManagement(milestoneDistManagement);
    List<Profile> profiles = new ArrayList<>();
    profiles.add(profile);

    profiles.add(centralProfile());

    pomModel.setProfiles(profiles);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-stream-app-maven-plugin,代码行数:19,代码来源:MavenModelUtils.java

示例3: visitDistributionManagement

import org.apache.maven.model.DistributionManagement; //导入方法依赖的package包/类
private void visitDistributionManagement( ModelVisitor visitor, DistributionManagement distributionManagement )
{
    DeploymentRepository repository = distributionManagement.getRepository();
    if ( repository != null )
    {
        visitor.visitDistributionManagementRepository( repository );
        visitDistributionManagementRepository( visitor, repository );
        repository = visitor.replaceDistributionManagementRepository( repository );
        distributionManagement.setRepository( repository );
    }

    DeploymentRepository snapshotRepository = distributionManagement.getSnapshotRepository();
    if ( snapshotRepository != null )
    {
        visitor.visitDistributionManagementSnapshotRepository( snapshotRepository );
        visitDistributionManagementSnapshotRepository( visitor, snapshotRepository );
        snapshotRepository = visitor.replaceDistributionManagementSnapshotRepository( snapshotRepository );
        distributionManagement.setSnapshotRepository( snapshotRepository );
    }

    Site site = distributionManagement.getSite();
    if ( site != null )
    {
        visitor.visitDistributionManagementSite( site );
        site = visitor.replaceDistributionManagementSite( site );
        distributionManagement.setSite( site );
    }

    Relocation relocation = distributionManagement.getRelocation();
    if ( relocation != null )
    {
        visitor.visitDistributionManagementRelocation( relocation );
        relocation = visitor.replaceDistributionManagementRelocation( relocation );
        distributionManagement.setRelocation( relocation );
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:37,代码来源:DefaultModelProcessor.java

示例4: visitProfileDistributionManagement

import org.apache.maven.model.DistributionManagement; //导入方法依赖的package包/类
private void visitProfileDistributionManagement( ModelVisitor visitor,
                                                 DistributionManagement distributionManagement )
{
    DeploymentRepository repository = distributionManagement.getRepository();
    if ( repository != null )
    {
        visitor.visitProfileDistributionManagementRepository( repository );
        visitProfileDistributionManagementRepository( visitor, repository );
        repository = visitor.replaceProfileDistributionManagementRepository( repository );
        distributionManagement.setRepository( repository );
    }

    DeploymentRepository snapshotRepository = distributionManagement.getSnapshotRepository();
    if ( snapshotRepository != null )
    {
        visitor.visitProfileDistributionManagementSnapshotRepository( snapshotRepository );
        visitProfileDistributionManagementSnapshotRepository( visitor, snapshotRepository );
        snapshotRepository = visitor.replaceProfileDistributionManagementSnapshotRepository( snapshotRepository );
        distributionManagement.setSnapshotRepository( snapshotRepository );
    }

    Site site = distributionManagement.getSite();
    if ( site != null )
    {
        visitor.visitProfileDistributionManagementSite( site );
        site = visitor.replaceProfileDistributionManagementSite( site );
        distributionManagement.setSite( site );
    }

    Relocation relocation = distributionManagement.getRelocation();
    if ( relocation != null )
    {
        visitor.visitProfileDistributionManagementRelocation( relocation );
        relocation = visitor.replaceProfileDistributionManagementRelocation( relocation );
        distributionManagement.setRelocation( relocation );
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:38,代码来源:DefaultModelProcessor.java


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