protected boolean isSiteEmpty( Site site ) { return StringUtils.isEmpty( site.getId() ) && StringUtils.isEmpty( site.getName() ) && StringUtils.isEmpty( site.getUrl() ); }
public static Site cloneSite( Site src ) { if ( src == null ) { return null; } Site result = new Site(); result.setId( src.getId() ); result.setName( src.getName() ); result.setUrl( src.getUrl() ); return result; }
/** * Method writeSite. * * @param site * @param serializer * @param tagName * @throws java.io.IOException */ private void writeSite( Site site, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( site.getChildSiteUrlInheritAppendPath() != null ) { serializer.attribute( NAMESPACE, "child.site.url.inherit.append.path", site.getChildSiteUrlInheritAppendPath() ); } if ( site.getId() != null ) { serializer.startTag( NAMESPACE, "id" ).text( site.getId() ).endTag( NAMESPACE, "id" ); } if ( site.getName() != null ) { serializer.startTag( NAMESPACE, "name" ).text( site.getName() ).endTag( NAMESPACE, "name" ); } if ( site.getUrl() != null ) { serializer.startTag( NAMESPACE, "url" ).text( site.getUrl() ).endTag( NAMESPACE, "url" ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writeSite( Site, String, XmlSerializer )
site.setId( parentDistMgmt.getSite().getId() );
site.setId( parentDistMgmt.getSite().getId() );
/** * Method writeSite. * * @param site * @param serializer * @param tagName * @throws java.io.IOException */ private void writeSite( Site site, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( site.getId() != null ) { serializer.attribute( NAMESPACE, "id", site.getId() ); } if ( site.getName() != null ) { serializer.attribute( NAMESPACE, "name", site.getName() ); } if ( site.getUrl() != null ) { serializer.attribute( NAMESPACE, "url", site.getUrl() ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writeSite( Site, String, XmlSerializer )
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(); } }
private String stagingRepoId() { if ( stagingRepositoryId != null ) { return stagingRepositoryId; } try { return getSite( project ).getId(); } catch ( MojoExecutionException ex ) { return "stagingSite"; } } }
@Override protected Site determineDeploySite() throws MojoExecutionException { Site top = new Site(); top.setId( stagingRepoId() ); getLog().info( "Using this server ID for stage deploy: " + top.getId() ); String stagingURL = determineStageDeploySiteURL(); getLog().info( "Using this base URL for stage deploy: " + stagingURL ); top.setUrl( stagingURL ); return top; }
/** * {@inheritDoc} */ public void execute() throws MojoExecutionException { if ( skip && isDeploy() ) { getLog().info( "maven.site.skip = true: Skipping site deployment" ); return; } if ( skipDeploy && isDeploy() ) { getLog().info( "maven.site.deploy.skip = true: Skipping site deployment" ); return; } deployTo( new BugFixedRepository( getDeploySite().getId(), getDeploySite().getUrl() ) ); }
/** * Method updateSite * * @param value * @param element * @param counter * @param xmlTag */ protected void updateSite(Site 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); findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null); } } //-- void updateSite(Site, String, Counter, Element)
/** * Method updateSite. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateSite(Site 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); findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null); } } //-- void updateSite(Site, String, Counter, Element)
/** * Method updateSite * * @param value * @param element * @param counter * @param xmlTag */ protected void updateSite( Site 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 ); findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null ); findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null ); findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null ); } } // -- void updateSite(Site, String, Counter, Element)
/** * Method updateSite. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateSite(Site 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); findAndReplaceSimpleElement(innerCount, root, "id", value.getId(), null); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement(innerCount, root, "url", value.getUrl(), null); } } // -- void updateSite(Site, String, Counter, Element)
/** * Method updateSite. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateSite( Site 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 ); findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null ); findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null ); findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null ); } } // -- void updateSite(Site, String, Counter, Element)
/** * Method updateSite * * @param value * @param element * @param counter * @param xmlTag */ protected void updateSite( Site 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 ); findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null ); findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null ); findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null ); } } // -- void updateSite(Site, String, Counter, Element)
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(); } }