protected void mergeDistributionManagement_Status( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getStatus(); if ( src != null ) { if ( sourceDominant || target.getStatus() == null ) { target.setStatus( src ); target.setLocation( "status", source.getLocation( "status" ) ); } } }
private MavenProject buildFromSourceFileInternal( File projectDescriptor, ProjectBuilderConfiguration config, boolean checkDistributionManagementStatus ) throws ProjectBuildingException { Model model = readModel( "unknown", projectDescriptor, true ); MavenProject project = buildInternal( projectDescriptor.getAbsolutePath(), model, config, buildArtifactRepositories( getSuperModel() ), projectDescriptor, true ); if ( checkDistributionManagementStatus ) { if ( ( project.getDistributionManagement() != null ) && ( project.getDistributionManagement().getStatus() != null ) ) { String projectId = safeVersionlessKey( project.getGroupId(), project.getArtifactId() ); throw new ProjectBuildingException( projectId, "Invalid project file: distribution status must not be specified for a project outside of the repository" ); } } return project; }
status = ArtifactStatus.valueOf( distributionManagement.getStatus() );
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 ( distMgmt != null ) if ( distMgmt.getStatus() != null )
protected void mergeDistributionManagement_Status( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getStatus(); if ( src != null ) { if ( sourceDominant || target.getStatus() == null ) { target.setStatus( src ); target.setLocation( "status", source.getLocation( "status" ) ); } } }
/** * The status element of the distributionManagement section must not be * set in local projects. This method removes that element from the model. */ private void removeDistributionManagementStatus( Model v4Model ) { if ( v4Model.getDistributionManagement() != null ) { if ( "converted".equals( v4Model.getDistributionManagement().getStatus() ) ) { v4Model.getDistributionManagement().setStatus( null ); } } }
/** * Method updateDistributionManagement. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateDistributionManagement(DistributionManagement value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); updateDeploymentRepository(value.getRepository(), "repository", innerCount, root); updateDeploymentRepository(value.getSnapshotRepository(), "snapshotRepository", innerCount, root); updateSite(value.getSite(), "site", innerCount, root); findAndReplaceSimpleElement(innerCount, root, "downloadUrl", value.getDownloadUrl(), null); updateRelocation(value.getRelocation(), "relocation", innerCount, root); findAndReplaceSimpleElement(innerCount, root, "status", value.getStatus(), null); } } // -- void updateDistributionManagement(DistributionManagement, String, // Counter, Element)
/** * Method updateDistributionManagement. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateDistributionManagement(DistributionManagement value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); updateDeploymentRepository( value.getRepository(), "repository", innerCount, root); updateDeploymentRepository( value.getSnapshotRepository(), "snapshotRepository", innerCount, root); updateSite( value.getSite(), "site", innerCount, root); findAndReplaceSimpleElement(innerCount, root, "downloadUrl", value.getDownloadUrl(), null); updateRelocation( value.getRelocation(), "relocation", innerCount, root); findAndReplaceSimpleElement(innerCount, root, "status", value.getStatus(), null); } } //-- void updateDistributionManagement(DistributionManagement, String, Counter, Element)
/** * Method updateDistributionManagement * * @param value * @param element * @param counter * @param xmlTag */ protected void updateDistributionManagement(DistributionManagement value, String xmlTag, Counter counter, Element element) { boolean shouldExist = value != null; Element root = updateElement(counter, element, xmlTag, shouldExist); if (shouldExist) { Counter innerCount = new Counter(counter.getDepth() + 1); updateDeploymentRepository( value.getRepository(), "repository", innerCount, root); updateDeploymentRepository( value.getSnapshotRepository(), "snapshotRepository", innerCount, root); updateSite( value.getSite(), "site", innerCount, root); findAndReplaceSimpleElement(innerCount, root, "downloadUrl", value.getDownloadUrl(), null); updateRelocation( value.getRelocation(), "relocation", innerCount, root); findAndReplaceSimpleElement(innerCount, root, "status", value.getStatus(), null); } } //-- void updateDistributionManagement(DistributionManagement, String, Counter, Element)
/** * Method updateDistributionManagement * * @param value * @param element * @param counter * @param xmlTag */ protected void updateDistributionManagement( DistributionManagement value, String xmlTag, Counter counter, Element element ) { boolean shouldExist = value != null; Element root = updateElement( counter, element, xmlTag, shouldExist ); if ( shouldExist ) { Counter innerCount = new Counter( counter.getDepth() + 1 ); updateDeploymentRepository( value.getRepository(), "repository", innerCount, root ); updateDeploymentRepository( value.getSnapshotRepository(), "snapshotRepository", innerCount, root ); updateSite( value.getSite(), "site", innerCount, root ); findAndReplaceSimpleElement( innerCount, root, "downloadUrl", value.getDownloadUrl(), null ); updateRelocation( value.getRelocation(), "relocation", innerCount, root ); findAndReplaceSimpleElement( innerCount, root, "status", value.getStatus(), null ); } } // -- void updateDistributionManagement(DistributionManagement, String, Counter, Element)
/** * Method updateDistributionManagement * * @param value * @param element * @param counter * @param xmlTag */ protected void updateDistributionManagement( DistributionManagement value, String xmlTag, Counter counter, Element element ) { boolean shouldExist = value != null; Element root = updateElement( counter, element, xmlTag, shouldExist ); if ( shouldExist ) { Counter innerCount = new Counter( counter.getDepth() + 1 ); updateDeploymentRepository( value.getRepository(), "repository", innerCount, root ); updateDeploymentRepository( value.getSnapshotRepository(), "snapshotRepository", innerCount, root ); updateSite( value.getSite(), "site", innerCount, root ); findAndReplaceSimpleElement( innerCount, root, "downloadUrl", value.getDownloadUrl(), null ); updateRelocation( value.getRelocation(), "relocation", innerCount, root ); findAndReplaceSimpleElement( innerCount, root, "status", value.getStatus(), null ); } } // -- void updateDistributionManagement(DistributionManagement, String, Counter, Element)
/** * Method updateDistributionManagement. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateDistributionManagement( DistributionManagement value, String xmlTag, Counter counter, Element element ) { boolean shouldExist = value != null; Element root = updateElement( counter, element, xmlTag, shouldExist ); if ( shouldExist ) { Counter innerCount = new Counter( counter.getDepth() + 1 ); updateDeploymentRepository( value.getRepository(), "repository", innerCount, root ); updateDeploymentRepository( value.getSnapshotRepository(), "snapshotRepository", innerCount, root ); updateSite( value.getSite(), "site", innerCount, root ); findAndReplaceSimpleElement( innerCount, root, "downloadUrl", value.getDownloadUrl(), null ); updateRelocation( value.getRelocation(), "relocation", innerCount, root ); findAndReplaceSimpleElement( innerCount, root, "status", value.getStatus(), null ); } } // -- void updateDistributionManagement(DistributionManagement, String, Counter, Element)
); updateRelocation( value.getRelocation(), "relocation", innerCount, root ); findAndReplaceSimpleElement( innerCount, root, "status", value.getStatus(), null );
if ( distMgmt != null ) if ( distMgmt.getStatus() != null )