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

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

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

Build.getScriptSourceDirectory介绍

[英]Get this element specifies a directory containing the script sources of the project. This directory is meant to be different from the sourceDirectory, in that its contents will be copied to the output directory in most cases (since scripts are interpreted rather than compiled). The default value is src/main/scripts.
[中]Get此元素指定包含项目脚本源的目录。此目录与sourceDirectory不同,因为在大多数情况下,它的内容将复制到输出目录(因为脚本是解释的,而不是编译的)。默认值为src/main/scripts

代码示例

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

public String getScriptSourceDirectory()
{
  return build.getScriptSourceDirectory();
}

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

protected void mergeBuild_ScriptSourceDirectory( Build target, Build source, boolean sourceDominant,
                         Map<Object, Object> context )
{
  String src = source.getScriptSourceDirectory();
  if ( src != null )
  {
    if ( sourceDominant || target.getScriptSourceDirectory() == null )
    {
      target.setScriptSourceDirectory( src );
      target.setLocation( "scriptSourceDirectory", source.getLocation( "scriptSourceDirectory" ) );
    }
  }
}

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

if ( !objectEquals( oBuild.getScriptSourceDirectory(), build.getScriptSourceDirectory() ) )

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

build.setScriptSourceDirectory( unalignFromBaseDirectory( build.getScriptSourceDirectory(), basedir ) );

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

project.addScriptSourceRoot( build.getScriptSourceDirectory() );

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

if ( build.getScriptSourceDirectory() != null )
  serializer.startTag( NAMESPACE, "scriptSourceDirectory" ).text( build.getScriptSourceDirectory() ).endTag( NAMESPACE, "scriptSourceDirectory" );

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

if ( childBuild.getScriptSourceDirectory() == null )
  childBuild.setScriptSourceDirectory( parentBuild.getScriptSourceDirectory() );

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

project.addScriptSourceRoot( build.getScriptSourceDirectory() );
project.addCompileSourceRoot( build.getSourceDirectory() );
project.addTestCompileSourceRoot( build.getTestSourceDirectory() );

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

if ( childBuild.getScriptSourceDirectory() == null )
  childBuild.setScriptSourceDirectory( parentBuild.getScriptSourceDirectory() );

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

debugMessages ) );
dynamicBuild.setScriptSourceDirectory( restoreString( dynamicBuild.getScriptSourceDirectory(),
                             originalInterpolatedBuild.getScriptSourceDirectory(),
                             changedBuild.getScriptSourceDirectory(),
                             project,
                             config,

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

build.setScriptSourceDirectory( alignToBaseDirectory( build.getScriptSourceDirectory(), basedir ) );

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

out.write("            .sourceDirectory(\"" + build.getSourceDirectory() + "\")" + br);
if (build.getScriptSourceDirectory() != null) {
  out.write("            .scriptSourceDirectory(\"" + build.getScriptSourceDirectory() + "\")" + br);

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

if ( build.getScriptSourceDirectory() != null )
  serializer.attribute( NAMESPACE, "scriptSourceDirectory", build.getScriptSourceDirectory() );

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

protected void mergeBuild_ScriptSourceDirectory( Build target, Build source, boolean sourceDominant,
                         Map<Object, Object> context )
{
  String src = source.getScriptSourceDirectory();
  if ( src != null )
  {
    if ( sourceDominant || target.getScriptSourceDirectory() == null )
    {
      target.setScriptSourceDirectory( src );
      target.setLocation( "scriptSourceDirectory", source.getLocation( "scriptSourceDirectory" ) );
    }
  }
}

代码示例来源:origin: org.codehaus.mevenide/nb-mvn-embedder

/**
 * Method updateBuild
 * 
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateBuild(Build value, String xmlTag, Counter counter, Element element)
{
  boolean shouldExist = value != null;
  Element root = updateElement(counter, element, xmlTag, shouldExist);
  if (shouldExist) {
    Counter innerCount = new Counter(counter.getDepth() + 1);
    findAndReplaceSimpleElement(innerCount, root,  "sourceDirectory", value.getSourceDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "scriptSourceDirectory", value.getScriptSourceDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "testSourceDirectory", value.getTestSourceDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "outputDirectory", value.getOutputDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "testOutputDirectory", value.getTestOutputDirectory(), null);
    iterateExtension(innerCount, root, value.getExtensions(),"extensions","extension");
    findAndReplaceSimpleElement(innerCount, root,  "defaultGoal", value.getDefaultGoal(), null);
    iterateResource(innerCount, root, value.getResources(),"resources","resource");
    iterateResource(innerCount, root, value.getTestResources(),"testResources","testResource");
    findAndReplaceSimpleElement(innerCount, root,  "directory", value.getDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "finalName", value.getFinalName(), null);
    findAndReplaceSimpleLists(innerCount, root, value.getFilters(), "filters", "filter");
    updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root);
    iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
  }
} //-- void updateBuild(Build, String, Counter, Element)

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-maven-embedder

/**
 * Method updateBuild.
 * 
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateBuild(Build value, String xmlTag, Counter counter, Element element)
{
  boolean shouldExist = value != null;
  Element root = updateElement(counter, element, xmlTag, shouldExist);
  if (shouldExist) {
    Counter innerCount = new Counter(counter.getDepth() + 1);
    findAndReplaceSimpleElement(innerCount, root,  "sourceDirectory", value.getSourceDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "scriptSourceDirectory", value.getScriptSourceDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "testSourceDirectory", value.getTestSourceDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "outputDirectory", value.getOutputDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "testOutputDirectory", value.getTestOutputDirectory(), null);
    iterateExtension(innerCount, root, value.getExtensions(),"extensions","extension");
    findAndReplaceSimpleElement(innerCount, root,  "defaultGoal", value.getDefaultGoal(), null);
    iterateResource(innerCount, root, value.getResources(),"resources","resource");
    iterateResource(innerCount, root, value.getTestResources(),"testResources","testResource");
    findAndReplaceSimpleElement(innerCount, root,  "directory", value.getDirectory(), null);
    findAndReplaceSimpleElement(innerCount, root,  "finalName", value.getFinalName(), null);
    findAndReplaceSimpleLists(innerCount, root, value.getFilters(), "filters", "filter");
    updatePluginManagement( value.getPluginManagement(), "pluginManagement", innerCount, root);
    iteratePlugin(innerCount, root, value.getPlugins(),"plugins","plugin");
  }
} //-- void updateBuild(Build, String, Counter, Element)

代码示例来源:origin: org.jboss.forge.addon/maven-impl

findAndReplaceSimpleElement(innerCount, root, "scriptSourceDirectory", value.getScriptSourceDirectory(),
    null);
findAndReplaceSimpleElement(innerCount, root, "testSourceDirectory", value.getTestSourceDirectory(), null);

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

findAndReplaceSimpleElement( innerCount, root, "scriptSourceDirectory", value.getScriptSourceDirectory(),
               null );
findAndReplaceSimpleElement( innerCount, root, "testSourceDirectory", value.getTestSourceDirectory(),

代码示例来源:origin: com.github.htfv.maven.plugins/build-configurator-core

interpolateString(build.getOutputDirectory()));
build.setScriptSourceDirectory(
    interpolateString(build.getScriptSourceDirectory()));
build.setSourceDirectory(
    interpolateString(build.getSourceDirectory()));

相关文章