org.codehaus.plexus.util.FileUtils.getDefaultExcludes()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(103)

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

FileUtils.getDefaultExcludes介绍

暂无

代码示例

代码示例来源:origin: org.codehaus.plexus/plexus-utils

/**
 * @return the default excludes pattern as list.
 * @see #getDefaultExcludes()
 */
public static List<String> getDefaultExcludesAsList()
{
  return Arrays.asList( getDefaultExcludes() );
}

代码示例来源:origin: org.apache.servicemix.kernel.gshell/org.apache.servicemix.kernel.gshell.core

public static List getDefaultExcludesAsList()
{
  return Arrays.asList( getDefaultExcludes() );
}

代码示例来源:origin: org.jvnet.jaxb1.maven2/maven-jaxb1-plugin

/**
 * Modifies input list by adding plexus tools default excludes.
 * 
 * @param origExcludes a list that must support the 'add' operation.
 * @return the augmented list or the input unchanged.
 */
protected List/*<String>*/ getExcludes(List/*<String>*/ origExcludes) {
  if (origExcludes == null || this.isDisableDefaultExcludes())
    return origExcludes;

  origExcludes.addAll( Arrays.asList( FileUtils.getDefaultExcludes() ) );

  return origExcludes;
}

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

private List<File> getWsdlFiles(File dir)
  throws MojoExecutionException {
  List<String> exList = new ArrayList<>();
  if (excludes != null) {
    exList.addAll(Arrays.asList(excludes));
  }
  exList.addAll(Arrays.asList(org.codehaus.plexus.util.FileUtils.getDefaultExcludes()));
  String inc = getIncludeExcludeString(includes);
  String ex = getIncludeExcludeString(exList.toArray(new String[0]));
  try {
    List<?> newfiles = org.codehaus.plexus.util.FileUtils.getFiles(dir, inc, ex);
    return CastUtils.cast(newfiles);
  } catch (IOException exc) {
    throw new MojoExecutionException(exc.getMessage(), exc);
  }
}

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

public static List<File> getWsdlFiles(File dir, String[] includes, String[] excludes)
  throws MojoExecutionException {
  List<String> exList = new ArrayList<>();
  if (excludes != null) {
    exList.addAll(Arrays.asList(excludes));
  }
  exList.addAll(Arrays.asList(org.codehaus.plexus.util.FileUtils.getDefaultExcludes()));
  String inc = joinWithComma(includes);
  String ex = joinWithComma(exList.toArray(new String[0]));
  try {
    List<?> newfiles = org.codehaus.plexus.util.FileUtils.getFiles(dir, inc, ex);
    return CastUtils.cast(newfiles);
  } catch (IOException exc) {
    throw new MojoExecutionException(exc.getMessage(), exc);
  }
}

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

private static List<File> getWadlFiles(File dir, String[] includes, String[] excludes)
  throws MojoExecutionException {
  List<String> exList = new ArrayList<>();
  if (excludes != null) {
    exList.addAll(Arrays.asList(excludes));
  }
  exList.addAll(Arrays.asList(org.codehaus.plexus.util.FileUtils.getDefaultExcludes()));
  String inc = joinWithComma(includes);
  String ex = joinWithComma(exList.toArray(new String[0]));
  try {
    List<?> newfiles = org.codehaus.plexus.util.FileUtils.getFiles(dir, inc, ex);
    return CastUtils.cast(newfiles);
  } catch (IOException exc) {
    throw new MojoExecutionException(exc.getMessage(), exc);
  }
}

代码示例来源:origin: org.apache.cxf/cxf-codegen-plugin

public static List<File> getWsdlFiles(File dir, String[] includes, String[] excludes)
  throws MojoExecutionException {
  List<String> exList = new ArrayList<>();
  if (excludes != null) {
    exList.addAll(Arrays.asList(excludes));
  }
  exList.addAll(Arrays.asList(org.codehaus.plexus.util.FileUtils.getDefaultExcludes()));
  String inc = joinWithComma(includes);
  String ex = joinWithComma(exList.toArray(new String[0]));
  try {
    List<?> newfiles = org.codehaus.plexus.util.FileUtils.getFiles(dir, inc, ex);
    return CastUtils.cast(newfiles);
  } catch (IOException exc) {
    throw new MojoExecutionException(exc.getMessage(), exc);
  }
}

代码示例来源:origin: org.apache.sling/maven-launchpad-plugin

private void copyConfigurationFiles() throws MojoExecutionException {
  final File configDir = this.getConfigDirectory();
  if (configDir.exists() ) {
    try {
      copyDirectory(configDir, new File(getOutputDirectory(), CONFIG_PATH_PREFIX), null, FileUtils.getDefaultExcludes());
    } catch (IOException e) {
      throw new MojoExecutionException("Unable to copy configuration files", e);
    }
  }
}

代码示例来源:origin: org.apache.cxf/cxf-wsdl-validator-plugin

private List<File> getWsdlFiles(File dir)
  throws MojoExecutionException {
  List<String> exList = new ArrayList<>();
  if (excludes != null) {
    exList.addAll(Arrays.asList(excludes));
  }
  exList.addAll(Arrays.asList(org.codehaus.plexus.util.FileUtils.getDefaultExcludes()));
  String inc = getIncludeExcludeString(includes);
  String ex = getIncludeExcludeString(exList.toArray(new String[0]));
  try {
    List<?> newfiles = org.codehaus.plexus.util.FileUtils.getFiles(dir, inc, ex);
    return CastUtils.cast(newfiles);
  } catch (IOException exc) {
    throw new MojoExecutionException(exc.getMessage(), exc);
  }
}

代码示例来源:origin: org.apache.sling/maven-launchpad-plugin

private final void extractConfigurations() throws MojoExecutionException, IOException {
  final Set<Artifact> dependencies = project.getDependencyArtifacts();
  for (Artifact artifact : dependencies) {
    if (PARTIAL.equals(artifact.getType())) {
      extractConfiguration(artifact);
    }
  }
  // copy own config files
  if ( this.overlayConfigDir != null && super.getConfigDirectory().exists() ) {
    copyDirectory(super.getConfigDirectory(), this.overlayConfigDir, null, FileUtils.getDefaultExcludes());
  }
}

代码示例来源:origin: org.codehaus.plexus/plexus-io

final String[] defaultExcludes = useDefaultExcludes ? FileUtils.getDefaultExcludes() : new String[] {};
if ( excludes == null )

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

excludes.addAll( Arrays.asList( FileUtils.getDefaultExcludes() ) );

代码示例来源:origin: org.apache.sling/maven-launchpad-plugin

this.overlayConfigDir = this.tempConfigDir;
final String[] defaultExcludes = FileUtils.getDefaultExcludes();
String[] excludes;
if ( this.configExcludes != null ) {

代码示例来源:origin: io.tesla.maven.plugin/tesla-plugin-tools-api

/**
 * @param basedir not null
 * @param include not null
 * @param exclude could be null
 * @return list of included files
 */
public static String[] findSources( String basedir, String include, String exclude )
{
  DirectoryScanner scanner = new DirectoryScanner();
  scanner.setBasedir( basedir );
  scanner.setIncludes( new String[] { include } );
  if ( !StringUtils.isEmpty( exclude ) )
  {
    scanner.setExcludes( new String[] { exclude, StringUtils.join( FileUtils.getDefaultExcludes(), "," ) } );
  }
  else
  {
    scanner.setExcludes( FileUtils.getDefaultExcludes() );
  }
  scanner.scan();
  return scanner.getIncludedFiles();
}

代码示例来源:origin: org.eclipse.tesla.plugin/tesla-plugin-tools-api

/**
 * @param basedir not null
 * @param include not null
 * @param exclude could be null
 * @return list of included files
 */
public static String[] findSources( String basedir, String include, String exclude )
{
  DirectoryScanner scanner = new DirectoryScanner();
  scanner.setBasedir( basedir );
  scanner.setIncludes( new String[] { include } );
  if ( !StringUtils.isEmpty( exclude ) )
  {
    scanner.setExcludes( new String[] { exclude, StringUtils.join( FileUtils.getDefaultExcludes(), "," ) } );
  }
  else
  {
    scanner.setExcludes( FileUtils.getDefaultExcludes() );
  }
  scanner.scan();
  return scanner.getIncludedFiles();
}

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

String[] defaultExcludes = FileUtils.getDefaultExcludes();
for ( String defaultExclude : defaultExcludes )

代码示例来源:origin: org.apache.sling/maven-launchpad-plugin

configDir.mkdirs();
copyDirectory(this.getConfigDirectory(), configDir,
    null, FileUtils.getDefaultExcludes());

代码示例来源:origin: org.apache.sling/maven-launchpad-plugin

configDir.mkdirs();
copyDirectory(this.getConfigDirectory(), configDir,
    null, FileUtils.getDefaultExcludes());

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

StringUtils.join( FileUtils.getDefaultExcludes(), ", " ) );

相关文章