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