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

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

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

Model.setName介绍

[英]Set the full name of the project.
[中]设置项目的全名。

代码示例

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

public void setName( String name )
{
  getModel().setName( name );
}

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

public void setName( String name )
{
  getModel().setName( name );
}

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

@Override
protected void mergeModel_Name( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )
{
  String src = source.getName();
  if ( src != null )
  {
    if ( sourceDominant )
    {
      target.setName( src );
      target.setLocation( "name", source.getLocation( "name" ) );
    }
  }
}

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

protected void mergeModel_Name( Model target, Model 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" ) );
    }
  }
}

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

model.setName( interpolatedTrimmed( parser.nextText(), "name" ) );

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

model.setName( interpolatedTrimmed( parser.nextText(), "name" ) );

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

result.setName( src.getName() );
result.setOrganization( cloneOrganization( src.getOrganization() ) );
result.setPackaging( src.getPackaging() );

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

/**
 * Set the full name of the project.
 *
 * @param name
 */
public FluentModelBuilder withName(String name) {
  model.setName(name);
  return this;
}

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

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

代码示例来源:origin: stackoverflow.com

public class RenameOperation implements ModelOperation {
  public RenameOperation(Model model) {
    // etc...
  }

  public void operate(Object value) {
    model.setName((String)value);
  }
}

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

@Override
public void setName(String name) {
  delegate.setName(name);
}

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

model.setName(name);

代码示例来源:origin: stackoverflow.com

ArrayList<Model> list = new ArrayList<Model>();
JSONArray jsonObj = new JSONArray(my_json_string);
Model model;
JSONObject element;
for(int i = 0, len = jsonObj.length(); i < len; i++) {
  element = jsonObj.getJsonObject(i);
  model = new Model();
  model.setName(element.getString("name"));
  //..similarly set other properties
  list.add(model);
}

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

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

代码示例来源:origin: stackoverflow.com

ArrayList<Model> arrayModel = new ArrayList<Model>();
  for(int i=0;i<arrayOne.size();i++)
 {
   Model model=new Model();
   model.setName(arrayOne.get(i));
   model.setDesc(arrayTwo.get(i));
   arrayModel.add(model);
 }

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

model.setDescription(description);
model.setUrl(url);
model.setName(projectId.getArtifact());
model.setGroupId(projectId.getGroup());
model.setVersion(projectId.getVersion());

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

protected static Model mergeModels(ModelInheritanceAssembler assembler, Model parent, Model child) {
  assembler.assembleModelInheritance(child, parent);
  // ModelInheritanceAssembler doesn't push the name, do it here
  if (child.getName() == null) {
    child.setName(parent.getName());
  }
  return child;
}

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

@Override
protected void mergeModel_Name( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )
{
  String src = source.getName();
  if ( src != null )
  {
    if ( sourceDominant )
    {
      target.setName( src );
      target.setLocation( "name", source.getLocation( "name" ) );
    }
  }
}

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

protected void mergeModel_Name( Model target, Model 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" ) );
    }
  }
}

代码示例来源:origin: org.jboss.forge/forge-dev-plugins

@Command("set-name")
public void setName(final PipeOut out,
    @Option(description = "the new name; for example: \"UI-Layer\"") final String name)
{
 Assert.notNull(name, "Name must not be empty");
 MavenCoreFacet mvn = project.getFacet(MavenCoreFacet.class);
 Model pom = mvn.getPOM();
 pom.setName(name);
 mvn.setPOM(pom);
 out.println("Set name [ " + name + " ]");
}

相关文章

Model类方法