org.apache.maven.model.Build.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(149)

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

Build.<init>介绍

暂无

代码示例

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

public BuildOverlay( Build build )
{
  if ( build == null )
  {
    this.build = new Build();
    
    this.resources = new ArrayList();
    
    this.testResources = new ArrayList();
  }
  else
  {
    this.build = build;
    
    this.resources = new ArrayList( build.getResources() );
    
    this.testResources = new ArrayList( build.getTestResources() );
  }
}

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

private Build getModelBuild()
{
  Build build = getModel().getBuild();
  if ( build == null )
  {
    build = new Build();
    getModel().setBuild( build );
  }
  
  return build;
}

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

private Build getModelBuild()
{
  Build build = getModel().getBuild();
  if ( build == null )
  {
    build = new Build();
    getModel().setBuild( build );
  }
  return build;
}

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

private void assembleBuildInheritance( Model child, Model parent )
{
  Build childBuild = child.getBuild();
  Build parentBuild = parent.getBuild();
  if ( parentBuild != null )
  {
    if ( childBuild == null )
    {
      childBuild = new Build();
      child.setBuild( childBuild );
    }
    assembleBuildInheritance( childBuild, parentBuild, true );
  }
}

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

private void assembleBuildInheritance( Model child, Model parent )
{
  Build childBuild = child.getBuild();
  Build parentBuild = parent.getBuild();
  if ( parentBuild != null )
  {
    if ( childBuild == null )
    {
      childBuild = new Build();
      child.setBuild( childBuild );
    }
    assembleBuildInheritance( childBuild, parentBuild, true );
  }
}

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

protected void mergeModel_Build( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )
{
  Build src = source.getBuild();
  if ( src != null )
  {
    Build tgt = target.getBuild();
    if ( tgt == null )
    {
      tgt = new Build();
      target.setBuild( tgt );
    }
    mergeBuild( tgt, src, sourceDominant, context );
  }
}

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

public void merge( Model target, Model source )
{
  if ( target.getBuild() == null )
  {
    target.setBuild( new Build() );
  }
  Map<Object, Object> context =
    Collections.<Object, Object>singletonMap( PLUGIN_MANAGEMENT, target.getBuild().getPluginManagement() );
  mergePluginContainer_Plugins( target.getBuild(), source.getBuild(), false, context );
}

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

public void injectLifecycleBindings( Model model, ModelBuildingRequest request, ModelProblemCollector problems )
{
  String packaging = model.getPackaging();
  Collection<Plugin> defaultPlugins = lifecycle.getPluginsBoundByDefaultToAllLifecycles( packaging );
  if ( defaultPlugins == null )
  {
    problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE )
        .setMessage( "Unknown packaging: " + packaging )
        .setLocation( model.getLocation( "packaging" ) ) );
  }
  else if ( !defaultPlugins.isEmpty() )
  {
    Model lifecycleModel = new Model();
    lifecycleModel.setBuild( new Build() );
    lifecycleModel.getBuild().getPlugins().addAll( defaultPlugins );
    merger.merge( model, lifecycleModel );
  }
}

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

@Override
public void injectProfile( Model model, Profile profile, ModelBuildingRequest request,
              ModelProblemCollector problems )
{
  if ( profile != null )
  {
    merger.mergeModelBase( model, profile );
    if ( profile.getBuild() != null )
    {
      if ( model.getBuild() == null )
      {
        model.setBuild( new Build() );
      }
      merger.mergeBuildBase( model.getBuild(), profile.getBuild() );
    }
  }
}

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

public static Build cloneBuild( Build src )
{
  if ( src == null )
  {
    return null;
  }
  Build result = new Build();
  
  cloneBuildBaseFields( src, result );
  
  result.setExtensions( cloneList( src.getExtensions(), EXTENSION_CLONER ) );
  result.setOutputDirectory( src.getOutputDirectory() );
  
  result.setScriptSourceDirectory( src.getScriptSourceDirectory() );
  result.setSourceDirectory( src.getSourceDirectory() );
  result.setTestOutputDirectory( src.getTestOutputDirectory() );
  result.setTestSourceDirectory( src.getTestSourceDirectory() );
  
  return result;
}

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

Build build = new Build();
for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )

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

@Override
protected Build getBuild() {
  if (build == null) {
    build = new Build();
    model.setBuild(build);
  }
  return build;
}

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

Build build = new Build();
InputLocation _location;
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );

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

build = new Build();
model.setBuild( build );

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

modelBuild = new Build();
model.setBuild( modelBuild );

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

private BuildBase getBuild(final Model model, String profileId) {
 if (profileId == null) {
  if (model.getBuild() == null) {
   model.setBuild(new Build());
  }
  return model.getBuild();
 } else {
  for (Profile p : model.getProfiles()) {
   if (profileId.equals(p.getId())) {
    if (p.getBuild() == null) {
     p.setBuild(new Build());
    }
    return p.getBuild();
   }
  }
  Profile profile = new Profile();
  profile.setId(profileId);
  profile.setBuild(new Build());
  model.addProfile(profile);
  return profile.getBuild();
 }
}

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

public void build(BuildNamedValue... namedValues) {
  Build build = new Build();

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

Build build = model.getBuild();
if (build == null) {
 build = new Build();
 model.setBuild(build);

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

public Model toMavenModel() {
 Model model = new Model();
 model.setBuild(new Build());
 model.setDescription(description);
 model.setUrl(url);
  Build build = new Build();
  String srcDir = dirs.get("src");
  String testDir = dirs.get("test");

相关文章