protected void mergeDistributionManagement_SnapshotRepository( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { DeploymentRepository src = source.getSnapshotRepository(); if ( src != null ) { DeploymentRepository tgt = target.getSnapshotRepository(); if ( tgt == null ) { tgt = new DeploymentRepository(); target.setSnapshotRepository( tgt ); } mergeDeploymentRepository( tgt, src, sourceDominant, context ); } }
@Override protected void mergeDistributionManagement_SnapshotRepository( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { DeploymentRepository src = source.getSnapshotRepository(); if ( src != null ) { DeploymentRepository tgt = target.getSnapshotRepository(); if ( sourceDominant || tgt == null ) { tgt = new DeploymentRepository(); tgt.setLocation( "", src.getLocation( "" ) ); target.setSnapshotRepository( tgt ); mergeDeploymentRepository( tgt, src, sourceDominant, context ); } } }
if ( pDistMgmt.getSnapshotRepository() != null ) mDistMgmt.setSnapshotRepository( pDistMgmt.getSnapshotRepository() );
&& project.getDistributionManagement().getSnapshotRepository() != null ) DeploymentRepository r = project.getDistributionManagement().getSnapshotRepository(); if ( !StringUtils.isEmpty( r.getId() ) && !StringUtils.isEmpty( r.getUrl() ) )
if ( childDistMgmt.getSnapshotRepository() == null ) if ( parentDistMgmt.getSnapshotRepository() != null ) copyDistributionRepository( parentDistMgmt.getSnapshotRepository() ); childDistMgmt.setSnapshotRepository( repository );
public static DistributionManagement cloneDistributionManagement( DistributionManagement src ) { if ( src == null ) { return null; } DistributionManagement result = new DistributionManagement(); result.setDownloadUrl( src.getDownloadUrl() ); result.setRelocation( cloneRelocation( src.getRelocation() ) ); result.setRepository( cloneDeploymentRepository( src.getRepository() ) ); result.setSite( cloneSite( src.getSite() ) ); result.setSnapshotRepository( cloneDeploymentRepository( src.getSnapshotRepository() ) ); result.setStatus( src.getStatus() ); return result; }
if ( childDistMgmt.getSnapshotRepository() == null ) if ( parentDistMgmt.getSnapshotRepository() != null ) copyDistributionRepository( parentDistMgmt.getSnapshotRepository() ); childDistMgmt.setSnapshotRepository( repository );
if ( distributionManagement.getSnapshotRepository() != null ) writeDeploymentRepository( (DeploymentRepository) distributionManagement.getSnapshotRepository(), "snapshotRepository", serializer );
project.setReleaseArtifactRepository( repo ); if ( dm.getSnapshotRepository() != null ) repo = ProjectUtils.buildDeploymentArtifactRepository( dm.getSnapshotRepository(), artifactRepositoryFactory, container ); project.setSnapshotArtifactRepository( repo );
validate20EffectiveRepository( problems, distMgmt.getSnapshotRepository(), "distributionManagement.snapshotRepository", request );
void distribution( DistributionManagement distribution ){ if ( distribution != null ){ p.printStartBlock( "distribution" ); if ( distribution.getRepository() != null ){ printRepositories("repository", distribution.getRepository() ); } if ( distribution.getSnapshotRepository() != null ){ printRepositories("snapshot_repository", distribution.getSnapshotRepository() ); } if ( distribution.getSite() != null ){ Site site = distribution.getSite(); p.printWithOptions( "site", options( "id", site.getId(), "name", site.getName(), "url", site.getUrl() ) ); } p.printEndBlock(); p.println(); } }
if ( distributionManagement.getSnapshotRepository() != null ) writeDeploymentRepository( (DeploymentRepository) distributionManagement.getSnapshotRepository(), "snapshotRepository", serializer );
private boolean hasSnapshotRepository() { return getDistributionManagement().getSnapshotRepository() != null; }
private boolean hasSnapshotRepository() { return getDistributionManagement().getSnapshotRepository() != null; }
protected void mergeDistributionManagement_SnapshotRepository( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { DeploymentRepository src = source.getSnapshotRepository(); if ( src != null ) { DeploymentRepository tgt = target.getSnapshotRepository(); if ( tgt == null ) { tgt = new DeploymentRepository(); target.setSnapshotRepository( tgt ); } mergeDeploymentRepository( tgt, src, sourceDominant, context ); } }
@Override protected void mergeDistributionManagement_SnapshotRepository( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { DeploymentRepository src = source.getSnapshotRepository(); if ( src != null ) { DeploymentRepository tgt = target.getSnapshotRepository(); if ( sourceDominant || tgt == null ) { tgt = new DeploymentRepository(); tgt.setLocation( "", src.getLocation( "" ) ); target.setSnapshotRepository( tgt ); mergeDeploymentRepository( tgt, src, sourceDominant, context ); } } }
private BanDistributionManagement setupProjectWithDistributionManagement( DeploymentRepository repository, DeploymentRepository snapshotRepository, Site site ) throws ExpressionEvaluationException { DistributionManagement dm = mock( DistributionManagement.class ); when( dm.getRepository() ).thenReturn( repository ); when( dm.getSnapshotRepository() ).thenReturn( snapshotRepository ); when( dm.getSite() ).thenReturn( site ); project = setupProject( dm ); when( project.getParent() ).thenReturn( mock( MavenProject.class ) ); when( project.isExecutionRoot() ).thenReturn( true ); BanDistributionManagement rule = setupEnforcerRule(); return rule; }
private BanDistributionManagement setupProjectWithParentDistributionManagement( DeploymentRepository repository, DeploymentRepository snapshotRepository, Site site ) throws ExpressionEvaluationException { project = setupProject( null ); DistributionManagement dmParent = mock( DistributionManagement.class ); when( dmParent.getRepository() ).thenReturn( repository ); when( dmParent.getSnapshotRepository() ).thenReturn( snapshotRepository ); when( dmParent.getSite() ).thenReturn( site ); MavenProject parentProject = mock( MavenProject.class ); Model model = mock( Model.class ); when( model.getDistributionManagement() ).thenReturn( dmParent ); when( parentProject.getOriginalModel() ).thenReturn( model ); when( project.getParent() ).thenReturn( parentProject ); BanDistributionManagement rule = setupEnforcerRule(); return rule; }
void distribution( DistributionManagement distribution ){ if ( distribution != null ){ p.printStartBlock( "distribution" ); if ( distribution.getRepository() != null ){ printRepositories("repository", distribution.getRepository() ); } if ( distribution.getSnapshotRepository() != null ){ printRepositories("snapshot_repository", distribution.getSnapshotRepository() ); } if ( distribution.getSite() != null ){ Site site = distribution.getSite(); p.printWithOptions( "site", options( "id", site.getId(), "name", site.getName(), "url", site.getUrl() ) ); } p.printEndBlock(); p.println(); } }
void distribution( DistributionManagement distribution ){ if ( distribution != null ){ p.printStartBlock( "distribution" ); if ( distribution.getRepository() != null ){ printRepositories("repository", distribution.getRepository() ); } if ( distribution.getSnapshotRepository() != null ){ printRepositories("snapshot_repository", distribution.getSnapshotRepository() ); } if ( distribution.getSite() != null ){ Site site = distribution.getSite(); p.printWithOptions( "site", options( "id", site.getId(), "name", site.getName(), "url", site.getUrl() ) ); } p.printEndBlock(); p.println(); } }