本文整理汇总了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);
}
示例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);
}
示例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 );
}
}
示例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 );
}
}