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

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

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

Model.setGroupId介绍

[英]Set a universally unique identifier for a project. It is normal to use a fully-qualified package name to distinguish it from other projects with a similar name (eg. org.apache.maven).
[中]设置项目的通用唯一标识符。通常使用完全限定的包名将其与具有类似名称的其他项目(例如:[$0$])区分开来。

代码示例

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

public void setGroupId( String groupId )
{
  getModel().setGroupId( groupId );
}

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

public void setGroupId( String groupId )
{
  getModel().setGroupId( groupId );
}

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

public MavenProject()
{
  Model model = new Model();
  
  model.setGroupId( EMPTY_PROJECT_GROUP_ID );
  model.setArtifactId( EMPTY_PROJECT_ARTIFACT_ID );
  model.setVersion( EMPTY_PROJECT_VERSION );
  
  this.setModel( model );
}

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

public MavenProject()
{
  Model model = new Model();
  model.setGroupId( EMPTY_PROJECT_GROUP_ID );
  model.setArtifactId( EMPTY_PROJECT_ARTIFACT_ID );
  model.setVersion( EMPTY_PROJECT_VERSION );
  setModel( model );
}

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

protected void mergeModel_GroupId( Model target, Model source, boolean sourceDominant,
                  Map<Object, Object> context )
{
  String src = source.getGroupId();
  if ( src != null )
  {
    if ( sourceDominant || target.getGroupId() == null )
    {
      target.setGroupId( src );
      target.setLocation( "groupId", source.getLocation( "groupId" ) );
    }
  }
}

代码示例来源: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: apache/maven

model.setGroupId( interpolatedTrimmed( parser.nextText(), "groupId" ) );

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

child.setGroupId( parent.getGroupId() );

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

child.setGroupId( parent.getGroupId() );

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

model.setGroupId( interpolatedTrimmed( parser.nextText(), "groupId" ) );

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

superModel.setGroupId( STANDALONE_SUPERPOM_GROUPID );

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

public Model mergeModel(Model model) {
 model.setGroupId(groupId);
 model.setArtifactId(artifactId);
 if(version != null) model.setVersion(version);
 return model;
}

代码示例来源:origin: mulesoft/mule

private void createTempMavenModel() {
 model = new Model();
 model.setArtifactId("temp-artifact-id");
 model.setGroupId("temp-group-id");
 model.setVersion("temp-version");
 model.setDependencies(new ArrayList<>());
 model.setModelVersion("4.0.0");
}

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

result.setDevelopers( cloneList( src.getDevelopers(), DEVELOPER_CLONER ) );
result.setGroupId( src.getGroupId() );
result.setInceptionYear( src.getInceptionYear() );
result.setIssueManagement( cloneIssueManagement( src.getIssueManagement() ) );

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

Model inheritingModel = new Model();
inheritingModel.setArtifactId(model.getArtifactId());
inheritingModel.setGroupId(model.getGroupId());
inheritingModel.setPackaging(model.getPackaging());
tasks = modelTasks.get(inheritingModel.getId());

代码示例来源:origin: mulesoft/mule

public File getArtifactPomFile() {
 if (artifactPomFile == null) {
  checkArgument(!isEmpty(artifactId), "Filename cannot be empty");
  final File tempFile = new File(getTempFolder(), artifactId + ".pom");
  tempFile.deleteOnExit();
  Model model = new Model();
  model.setGroupId(getGroupId());
  model.setArtifactId(getArtifactId());
  model.setVersion(getVersion());
  model.setModelVersion("4.0.0");
  if (!sharedLibraries.isEmpty()) {
   model.setBuild(new Build());
   model.getBuild().setPlugins(singletonList(createMuleMavenPlugin()));
  }
  for (AbstractDependencyFileBuilder fileBuilderDependency : dependencies) {
   model.addDependency(fileBuilderDependency.getAsMavenDependency());
  }
  artifactPomFile = new File(tempFile.getAbsolutePath());
  try (FileOutputStream fileOutputStream = new FileOutputStream(artifactPomFile)) {
   new MavenXpp3Writer().write(fileOutputStream, model);
  } catch (IOException e) {
   throw new MuleRuntimeException(e);
  }
 }
 return artifactPomFile;
}

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

model.setGroupId(groupId);

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

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

代码示例来源:origin: io.takari.polyglot/polyglot-yaml

public Model mergeModel(Model model) {
 model.setGroupId(groupId);
 model.setArtifactId(artifactId);
 if(version != null) model.setVersion(version);
 return model;
}

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

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

相关文章

Model类方法