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

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

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

Model.setDescription介绍

[英]Set a detailed description of the project, used by Maven whenever it needs to describe the project, such as on the web site. While this element can be specified as CDATA to enable the use of HTML tags within the description, it is discouraged to allow plain text representation. If you need to modify the index page of the generated web site, you are able to specify your own instead of adjusting this text.
[中]设置项目的详细描述,Maven在需要描述项目时使用,例如在web站点上。虽然可以将此元素指定为CDATA,以便在描述中使用HTML标记,但不建议允许纯文本表示。如果需要修改生成的网站的索引页,可以指定自己的索引页,而不是调整此文本。

代码示例

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

public void setDescription( String description )
{
  getModel().setDescription( description );
}

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

public void setDescription( String description )
{
  getModel().setDescription( description );
}

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

protected void mergeModel_Description( Model target, Model source, boolean sourceDominant,
                    Map<Object, Object> context )
{
  String src = source.getDescription();
  if ( src != null )
  {
    if ( sourceDominant || target.getDescription() == null )
    {
      target.setDescription( src );
      target.setLocation( "description", source.getLocation( "description" ) );
    }
  }
}

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

model.setDescription( interpolatedTrimmed( parser.nextText(), "description" ) );

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

child.setDescription( parent.getDescription() );

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

child.setDescription( parent.getDescription() );

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

model.setDescription( interpolatedTrimmed( parser.nextText(), "description" ) );

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

result.setDescription( src.getDescription() );
result.setDevelopers( cloneList( src.getDevelopers(), DEVELOPER_CLONER ) );

代码示例来源:origin: mojohaus/flatten-maven-plugin

@Override
  public void set( Model model, String value )
  {
    model.setDescription( value );
  };
};

代码示例来源:origin: com.buschmais.jqassistant.plugin/jqassistant.plugin.m2repo

@Override
public void setDescription(String description) {
  delegate.setDescription(description);
}

代码示例来源:origin: ru.yandex.qatools.clay/clay-maven-settings-builder

/**
 * Set a detailed description of the project, used by Maven
 * whenever it needs to
 *             describe the project, such as on the web site.
 * While this element can be specified as
 *             CDATA to enable the use of HTML tags within the
 * description, it is discouraged to allow
 *             plain text representation. If you need to modify
 * the index page of the generated web
 *             site, you are able to specify your own instead
 * of adjusting this text.
 *
 * @param description
 */
public FluentModelBuilder withDescription(String description) {
  model.setDescription(description);
  return this;
}

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

model.setDescription(description);

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

model.setDescription( getTrimmedValue( parser.nextText() ) );

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

public Model toMavenModel() {
 Model model = new Model();
 model.setBuild(new Build());
 model.setDescription(description);
 model.setUrl(url);
 model.setName(projectId.getArtifact());

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

protected void mergeModel_Description( Model target, Model source, boolean sourceDominant,
                    Map<Object, Object> context )
{
  String src = source.getDescription();
  if ( src != null )
  {
    if ( sourceDominant || target.getDescription() == null )
    {
      target.setDescription( src );
      target.setLocation( "description", source.getLocation( "description" ) );
    }
  }
}

代码示例来源:origin: org.apache.maven.plugins/maven-assembly-plugin

private MavenProject buildProjectStub( final Artifact depArtifact )
{
  final Model model = new Model();
  model.setGroupId( depArtifact.getGroupId() );
  model.setArtifactId( depArtifact.getArtifactId() );
  model.setVersion( depArtifact.getBaseVersion() );
  model.setPackaging( depArtifact.getType() );
  model.setDescription( "Stub for " + depArtifact.getId() );
  final MavenProject project = new MavenProject( model );
  project.setArtifact( depArtifact );
  return project;
}

代码示例来源:origin: org.apache.maven.plugins/maven-gpg-plugin

/**
 * Generates a minimal model from the user-supplied artifact information.
 *
 * @return The generated model, never <code>null</code>.
 */
private Model generateModel()
{
  Model model = new Model();
  model.setModelVersion( "4.0.0" );
  model.setGroupId( groupId );
  model.setArtifactId( artifactId );
  model.setVersion( version );
  model.setPackaging( packaging );
  model.setDescription( description );
  return model;
}

代码示例来源:origin: org.apache.maven.plugins/maven-install-plugin

/**
 * Generates a minimal model from the user-supplied artifact information.
 * 
 * @return The generated model, never <code>null</code>.
 */
private Model generateModel()
{
  Model model = new Model();
  model.setModelVersion( "4.0.0" );
  model.setGroupId( groupId );
  model.setArtifactId( artifactId );
  model.setVersion( version );
  model.setPackaging( packaging );
  model.setDescription( "POM was created from install:install-file" );
  return model;
}

代码示例来源:origin: org.wso2.maven/org.wso2.maven.core

public static MavenProject createMavenProject(String groupId, String artifactId, String version, String packagingType) {
  Model model = new Model();
  model.setGroupId(groupId);
  model.setArtifactId(artifactId);
  model.setVersion(version);
  model.setModelVersion("4.0.0");
  model.setName(artifactId);
  model.setDescription(artifactId);
  if (packagingType!=null){
    model.setPackaging(packagingType);
  }
  return new MavenProject(model);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.m2e.core.ui

public Model getModel() {
 Model model = new Model();
 model.setModelVersion("4.0.0"); //$NON-NLS-1$
 model.setGroupId(getGroupId());
 model.setArtifactId(getArtifactId());
 model.setVersion(getVersion());
 model.setPackaging(getPackaging());
 if(getModelName().length() > 0) {
  model.setName(getModelName());
 }
 if(getDescription().length() > 0) {
  model.setDescription(getDescription());
 }
 return model;
}

相关文章

Model类方法