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


Java DistributionManagement.getRepository方法代码示例

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


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

示例1: writeDistributionManagement

import org.apache.maven.model.DistributionManagement; //导入方法依赖的package包/类
private void writeDistributionManagement(DistributionManagement distributionManagement, String tagName, XmlSerializer serializer)
        throws java.io.IOException {
    serializer.startTag(NAMESPACE, tagName);
    flush(serializer);
    StringBuffer b = b(serializer);
    int start = b.length();

    if (distributionManagement.getRepository() != null) {
        writeDeploymentRepository((DeploymentRepository) distributionManagement.getRepository(), "repository", serializer);
    }
    if (distributionManagement.getSnapshotRepository() != null) {
        writeDeploymentRepository((DeploymentRepository) distributionManagement.getSnapshotRepository(), "snapshotRepository", serializer);
    }
    if (distributionManagement.getSite() != null) {
        writeSite((Site) distributionManagement.getSite(), "site", serializer);
    }
    if (distributionManagement.getDownloadUrl() != null) {
        writeValue(serializer, "downloadUrl", distributionManagement.getDownloadUrl(), distributionManagement);
    }
    if (distributionManagement.getRelocation() != null) {
        writeRelocation((Relocation) distributionManagement.getRelocation(), "relocation", serializer);
    }
    if (distributionManagement.getStatus() != null) {
        writeValue(serializer, "status", distributionManagement.getStatus(), distributionManagement);
    }
    serializer.endTag(NAMESPACE, tagName).flush();
    logLocation(distributionManagement, "", start, b.length());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:LocationAwareMavenXpp3Writer.java

示例2: 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

示例3: 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

示例4: getReleaseRepo

import org.apache.maven.model.DistributionManagement; //导入方法依赖的package包/类
private ArtifactRepository getReleaseRepo() {
	DistributionManagement distributionManagement = project.getDistributionManagement();
       if ( distributionManagement != null && distributionManagement.getRepository() != null ) {        	
       	try {
       		ArtifactRepository repo = repositorySystem.buildArtifactRepository(distributionManagement.getRepository());

               repositorySystem.injectProxy( projectBuilderConfiguration.getRepositorySession(), Arrays.asList( repo ) );
               repositorySystem.injectAuthentication( projectBuilderConfiguration.getRepositorySession(),
                                                      Arrays.asList( repo ) );
               return repo;
       	} catch (InvalidRepositoryException e) {}
       }
       return null;
}
 
开发者ID:johnoliver,项目名称:git-rollback-maven-plugin,代码行数:15,代码来源:GitReleaseRollback.java


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