Refine search
childDistMgmt = new DistributionManagement(); if ( childDistMgmt.getSite() == null ) if ( parentDistMgmt.getSite() != null ) Site site = new Site(); childDistMgmt.setSite( site ); site.setId( parentDistMgmt.getSite().getId() ); site.setName( parentDistMgmt.getSite().getName() ); site.setUrl( parentDistMgmt.getSite().getUrl() ); if ( site.getUrl() != null ) site.setUrl( appendPath( site.getUrl(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
protected void mergeSite_Id( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getId(); if ( src != null ) { if ( sourceDominant || target.getId() == null ) { target.setId( src ); target.setLocation( "id", source.getLocation( "id" ) ); } } }
protected void mergeSite_Name( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getName(); if ( src != null ) { if ( sourceDominant || target.getName() == null ) { target.setName( src ); target.setLocation( "name", source.getLocation( "name" ) ); } } }
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(); } }
paragraph( getI18nString( "overview.intro" ) ); if ( StringUtils.isNotEmpty( distributionManagement.getDownloadUrl() ) ) internalLink( distributionManagement.getDownloadUrl() ); endSection(); if ( distributionManagement.getRelocation() != null ) if ( distributionManagement.getSite() != null && StringUtils.isNotEmpty( distributionManagement.getSite().getUrl() ) ) startSection( getI18nString( "site" ) + getRepoName( distributionManagement.getSite().getId() ) ); internalLink( distributionManagement.getSite().getUrl() ); endSection();
private static void setDistMgmntSiteUrl( Model model, String url ) { if ( model.getDistributionManagement() == null ) { model.setDistributionManagement( new DistributionManagement() ); } if ( model.getDistributionManagement().getSite() == null ) { model.getDistributionManagement().setSite( new Site() ); } model.getDistributionManagement().getSite().setUrl( url ); } }
/** * Extract the distributionManagement site from the given MavenProject. * * @param project the MavenProject. Not null. * @return the project site. Not null. * Also site.getUrl() and site.getId() are guaranteed to be not null. * @throws MojoExecutionException if any of the site info is missing. */ protected static Site getSite( final MavenProject project ) throws MojoExecutionException { final DistributionManagement distributionManagement = project.getDistributionManagement(); if ( distributionManagement == null ) { throw new MojoExecutionException( "Missing distribution management in project " + getFullName( project ) ); } final Site site = distributionManagement.getSite(); if ( site == null ) { throw new MojoExecutionException( "Missing site information in the distribution management of the project " + getFullName( project ) ); } if ( site.getUrl() == null || site.getId() == null ) { throw new MojoExecutionException( "Missing site data: specify url and id for project " + getFullName( project ) ); } return site; }
distributionManagement = new DistributionManagement(); model.setDistributionManagement(distributionManagement); Site site = distributionManagement.getSite(); if (site == null) { site = new Site(); distributionManagement.setSite(site); String siteId = site.getId(); if (Strings.isNullOrBlank(siteId)) { site.setId("website"); changed = true; String siteUrl = site.getUrl(); if (Strings.isNullOrBlank(siteUrl)) { site.setUrl("dav:http://content-repository/sites/${project.groupId}/${project.artifactId}/${project.version}"); changed = true;
DistributionManagement distMgmt = new DistributionManagement(); distMgmt.setRepository( deployRepo ); distMgmt.setSnapshotRepository( deployRepo ); model.addPluginRepository( localAsRemote ); Site site = new Site(); site.setId( "integration-test.output" ); site.setUrl( tmpUrl ); distMgmt.setSite( site );
Site site = new Site(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) site.setChildSiteUrlInheritAppendPath( interpolatedTrimmed( value, "child.site.url.inherit.append.path" ) ); site.setId( interpolatedTrimmed( parser.nextText(), "id" ) ); site.setName( interpolatedTrimmed( parser.nextText(), "name" ) ); site.setUrl( interpolatedTrimmed( parser.nextText(), "url" ) );
@Override public void normalize( Model model, ModelBuildingRequest request ) { if ( model == null ) { return; } model.setUrl( normalize( model.getUrl() ) ); Scm scm = model.getScm(); if ( scm != null ) { scm.setUrl( normalize( scm.getUrl() ) ); scm.setConnection( normalize( scm.getConnection() ) ); scm.setDeveloperConnection( normalize( scm.getDeveloperConnection() ) ); } DistributionManagement dist = model.getDistributionManagement(); if ( dist != null ) { Site site = dist.getSite(); if ( site != null ) { site.setUrl( normalize( site.getUrl() ) ); } } }
protected void mergeSite_Url( Site target, Site source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getUrl(); if ( src != null ) { if ( sourceDominant || target.getUrl() == null ) { target.setUrl( src ); target.setLocation( "url", source.getLocation( "url" ) ); } } }
throws PomTranslationException DistributionManagement distributionManagement = new DistributionManagement(); site = new Site(); site.setId( "default" ); site.setName( "Default Site" ); site.setUrl( "file://" + siteDirectory ); site = new Site(); site.setId( "default" ); site.setName( "Default Site" ); site.setUrl( url.toString() ); distributionManagement.setSite( site ); distributionManagement.setRepository( repository ); distributionManagement.setStatus( "converted" );
@Override protected void mergeDistributionManagement_Site( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { Site src = source.getSite(); if ( src != null ) { Site tgt = target.getSite(); if ( sourceDominant || tgt == null || isSiteEmpty( tgt ) ) { if ( tgt == null ) { tgt = new Site(); } tgt.setLocation( "", src.getLocation( "" ) ); target.setSite( tgt ); mergeSite( tgt, src, sourceDominant, context ); } mergeSite_ChildSiteUrlInheritAppendPath( tgt, src, sourceDominant, context ); } }
protected void mergeDistributionManagement_Site( DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context ) { Site src = source.getSite(); if ( src != null ) { Site tgt = target.getSite(); if ( tgt == null ) { tgt = new Site(); target.setSite( tgt ); } mergeSite( tgt, src, sourceDominant, context ); } }
/** * 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 )