org.apache.maven.model.Model.getDistributionManagement()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.apache.maven.model.Model.getDistributionManagement()方法的一些代码示例,展示了Model.getDistributionManagement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getDistributionManagement()方法的具体详情如下:
包路径:org.apache.maven.model.Model
类名称:Model
方法名:getDistributionManagement

Model.getDistributionManagement介绍

暂无

代码示例

代码示例来源:origin: apache/maven

public DistributionManagement getDistributionManagement()
{
  return getModel().getDistributionManagement();
}

代码示例来源:origin: org.apache.maven/maven-project

public DistributionManagement getDistributionManagement()
{
  return getModel().getDistributionManagement();
}

代码示例来源:origin: apache/maven

private Relocation getRelocation( Model model )
{
  Relocation relocation = null;
  DistributionManagement distMgmt = model.getDistributionManagement();
  if ( distMgmt != null )
  {
    relocation = distMgmt.getRelocation();
  }
  return relocation;
}

代码示例来源:origin: apache/maven

private void setArtifactProperties( ArtifactDescriptorResult result, Model model )
  {
    String downloadUrl = null;
    DistributionManagement distMgmt = model.getDistributionManagement();
    if ( distMgmt != null )
    {
      downloadUrl = distMgmt.getDownloadUrl();
    }
    if ( downloadUrl != null && downloadUrl.length() > 0 )
    {
      Artifact artifact = result.getArtifact();
      Map<String, String> props = new HashMap<>( artifact.getProperties() );
      props.put( ArtifactProperties.DOWNLOAD_URL, downloadUrl );
      result.setArtifact( artifact.setProperties( props ) );
    }
  }
}

代码示例来源:origin: org.apache.maven/maven-project

private Model createStubModel( Artifact projectArtifact )
{
  getLogger().debug( "Using defaults for missing POM " + projectArtifact );
  Model model = new Model();
  model.setModelVersion( "4.0.0" );
  model.setArtifactId( projectArtifact.getArtifactId() );
  model.setGroupId( projectArtifact.getGroupId() );
  model.setVersion( projectArtifact.getVersion() );
  // TODO: not correct in some instances
  model.setPackaging( projectArtifact.getType() );
  model.setDistributionManagement( new DistributionManagement() );
  model.getDistributionManagement().setStatus( ArtifactStatus.GENERATED.toString() );
  return model;
}

代码示例来源:origin: org.apache.maven/maven-project

DistributionManagement distributionManagement = model.getDistributionManagement();

代码示例来源:origin: org.apache.maven/maven-project

private void assembleDistributionInheritence( Model child, Model parent, String childPathAdjustment, boolean appendPaths )
  if ( parent.getDistributionManagement() != null )
    DistributionManagement parentDistMgmt = parent.getDistributionManagement();
    DistributionManagement childDistMgmt = child.getDistributionManagement();

代码示例来源:origin: org.apache.maven/maven-project

private void injectDistributionManagement( Profile profile, Model model )
  DistributionManagement mDistMgmt = model.getDistributionManagement();

代码示例来源:origin: apache/maven

private void assembleDistributionInheritance( Model child, Model parent, String childPathAdjustment,
                       boolean appendPaths )
  if ( parent.getDistributionManagement() != null )
    DistributionManagement parentDistMgmt = parent.getDistributionManagement();
    DistributionManagement childDistMgmt = child.getDistributionManagement();

代码示例来源:origin: apache/maven

if ( model.getDistributionManagement() != null )
  writeDistributionManagement( (DistributionManagement) model.getDistributionManagement(), "distributionManagement", serializer );

代码示例来源:origin: org.apache.maven/maven-project

container ) );
DistributionManagement dm = model.getDistributionManagement();
if ( dm != null )

代码示例来源:origin: apache/maven

@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() ) );
    }
  }
}

代码示例来源:origin: apache/maven

DistributionManagement distMgmt = m.getDistributionManagement();
if ( distMgmt != null )

代码示例来源:origin: takari/polyglot-maven

if ( model.getDistributionManagement() != null )
  writeDistributionManagement( (DistributionManagement) model.getDistributionManagement(), "distributionManagement", serializer );

代码示例来源:origin: org.apache.maven/maven-resolver-provider

private Relocation getRelocation( Model model )
{
  Relocation relocation = null;
  DistributionManagement distMgmt = model.getDistributionManagement();
  if ( distMgmt != null )
  {
    relocation = distMgmt.getRelocation();
  }
  return relocation;
}

代码示例来源:origin: org.apache.maven/maven-aether-provider

private Relocation getRelocation( Model model )
{
  Relocation relocation = null;
  DistributionManagement distMngt = model.getDistributionManagement();
  if ( distMngt != null )
  {
    relocation = distMngt.getRelocation();
  }
  return relocation;
}

代码示例来源:origin: io.tesla.maven/maven-aether-provider

private Relocation getRelocation( Model model )
{
  Relocation relocation = null;
  DistributionManagement distMngt = model.getDistributionManagement();
  if ( distMngt != null )
  {
    relocation = distMngt.getRelocation();
  }
  return relocation;
}

代码示例来源:origin: com.atlassian.sdk/ap3-aether-maven-provider

private Relocation getRelocation( Model model )
{
  Relocation relocation = null;
  DistributionManagement distMngt = model.getDistributionManagement();
  if ( distMngt != null )
  {
    relocation = distMngt.getRelocation();
  }
  return relocation;
}

代码示例来源:origin: org.apache.maven.shared/maven-doxia-tools

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 );
  }
}

代码示例来源:origin: takari/polyglot-maven

void project(Model model) {
  String name = model.getName();
  if (name == null) {
    name = model.getArtifactId();
  }
  p.printStartBlock( "project", name, model.getUrl() );
  p.println();
  p.println( "model_version", model.getModelVersion() );
  p.println( "inception_year", model.getInceptionYear() );
  id(model);
  parent(model.getParent());
  p.println("packaging", model.getPackaging());
  p.println();
  description(model.getDescription());
  developers( model.getDevelopers() );
  issueManagement( model.getIssueManagement() );
  mailingLists( model.getMailingLists() );
  repositories( toRepositoryArray( model.getRepositories() ) );
  pluginRepositories( toRepositoryArray( model.getPluginRepositories() ) );
  sourceControl( model.getScm() );
  distribution( model.getDistributionManagement() );
  properties( model.getProperties() );
  dependencies( model.getDependencies() );
  modules( model.getModules() );
  managements( model.getDependencyManagement(), model.getBuild() );
  build( model.getBuild(), model.getBuild() );
  profiles( model.getProfiles() );
  reporting( model.getReporting() );
  p.printEndBlock();
}

相关文章

Model类方法