protected void mergeDistributionManagement_Repository( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { DeploymentRepository src = source.getRepository(); if ( src != null ) { DeploymentRepository tgt = target.getRepository(); if ( tgt == null ) { tgt = new DeploymentRepository(); target.setRepository( tgt ); } mergeDeploymentRepository( tgt, src, sourceDominant, context ); } }
@Override protected void mergeDistributionManagement_Repository( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { DeploymentRepository src = source.getRepository(); if ( src != null ) { DeploymentRepository tgt = target.getRepository(); if ( sourceDominant || tgt == null ) { tgt = new DeploymentRepository(); tgt.setLocation( "", src.getLocation( "" ) ); target.setRepository( tgt ); mergeDeploymentRepository( tgt, src, sourceDominant, context ); } } }
if ( pDistMgmt.getRepository() != null ) mDistMgmt.setRepository( pDistMgmt.getRepository() );
&& project.getDistributionManagement().getRepository() != null ) DeploymentRepository r = project.getDistributionManagement().getRepository(); if ( !StringUtils.isEmpty( r.getId() ) && !StringUtils.isEmpty( r.getUrl() ) )
if ( childDistMgmt.getRepository() == null ) if ( parentDistMgmt.getRepository() != null ) DeploymentRepository repository = copyDistributionRepository( parentDistMgmt.getRepository() ); childDistMgmt.setRepository( 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.getRepository() == null ) if ( parentDistMgmt.getRepository() != null ) DeploymentRepository repository = copyDistributionRepository( parentDistMgmt.getRepository() ); childDistMgmt.setRepository( repository );
if ( distributionManagement.getRepository() != null ) writeDeploymentRepository( (DeploymentRepository) distributionManagement.getRepository(), "repository", serializer );
if ( dm != null ) ArtifactRepository repo = ProjectUtils.buildDeploymentArtifactRepository( dm.getRepository(), artifactRepositoryFactory, container );
validate20EffectiveRepository( problems, distMgmt.getRepository(), "distributionManagement.repository", request ); validate20EffectiveRepository( problems, distMgmt.getSnapshotRepository(),
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.getRepository() != null ) writeDeploymentRepository( (DeploymentRepository) distributionManagement.getRepository(), "repository", serializer );
private boolean hasRepository() { return getDistributionManagement().getRepository() != null; }
private boolean hasRepository() { return getDistributionManagement().getRepository() != null; }
protected void mergeDistributionManagement_Repository( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { DeploymentRepository src = source.getRepository(); if ( src != null ) { DeploymentRepository tgt = target.getRepository(); if ( tgt == null ) { tgt = new DeploymentRepository(); target.setRepository( tgt ); } mergeDeploymentRepository( tgt, src, sourceDominant, context ); } }
@Override protected void mergeDistributionManagement_Repository( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { DeploymentRepository src = source.getRepository(); if ( src != null ) { DeploymentRepository tgt = target.getRepository(); if ( sourceDominant || tgt == null ) { tgt = new DeploymentRepository(); tgt.setLocation( "", src.getLocation( "" ) ); target.setRepository( 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(); } }