當前位置: 首頁>>代碼示例>>Java>>正文


Java FileSet.appendIncludes方法代碼示例

本文整理匯總了Java中org.apache.tools.ant.types.FileSet.appendIncludes方法的典型用法代碼示例。如果您正苦於以下問題:Java FileSet.appendIncludes方法的具體用法?Java FileSet.appendIncludes怎麽用?Java FileSet.appendIncludes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.tools.ant.types.FileSet的用法示例。


在下文中一共展示了FileSet.appendIncludes方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: execute

import org.apache.tools.ant.types.FileSet; //導入方法依賴的package包/類
/**
 * @see org.apache.tools.ant.Task#execute()
 */
@SuppressWarnings("unchecked")
@Override
public void execute() throws BuildException {
	// See if this is a slave plugin
	_slavePlugin = getProject().getProperty("slave.plugin").equalsIgnoreCase("true");
	FileSet slaveFiles = (FileSet)getProject().getReference("slave.fileset");
	_filePatterns = new ArrayList<String>();
	// Get the build start time as long
	SimpleDateFormat simpleBuildDate = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss.SSS");
	Date buildDate = null;
	try {
		buildDate = simpleBuildDate.parse(getProject().getProperty("build.plugins.start"));
	} catch (ParseException e) {
		throw new BuildException("Plugin build timestamp not set correctly");
	}
	_longDate = buildDate.getTime();
	_installedConfs = (ArrayList<String>)getProject().getReference("installed.confs");
	findResources(_resourceDir);
	if (_slavePlugin && !_filePatterns.isEmpty()) {
		String[] patterns = _filePatterns.toArray(new String[_filePatterns.size()]);
		slaveFiles.appendIncludes(patterns);
	}
}
 
開發者ID:drftpd-ng,項目名稱:drftpd3,代碼行數:27,代碼來源:ResourceTask.java

示例2: execute

import org.apache.tools.ant.types.FileSet; //導入方法依賴的package包/類
/**
 * @see org.apache.tools.ant.taskdefs.Zip#execute()
 */
@Override
public void execute() throws BuildException {
	// See if this is a slave plugin
	boolean slavePlugin = getProject().getProperty("slave.plugin").equalsIgnoreCase("true");
	FileSet slaveFiles = (FileSet)getProject().getReference("slave.fileset");
	// Run the actual Jar process
	super.execute();
	// Log created file if needed
	if (slavePlugin) {
		File zipFile = getDestFile();
		String installDir = getProject().getProperty("installdir");
		String relativePath = zipFile.getPath().substring(installDir.length()+1);
		slaveFiles.appendIncludes(new String[]{relativePath});
	}
}
 
開發者ID:drftpd-ng,項目名稱:drftpd3,代碼行數:19,代碼來源:LoggingZipTask.java

示例3: execute

import org.apache.tools.ant.types.FileSet; //導入方法依賴的package包/類
/**
 * @see org.apache.tools.ant.taskdefs.Jar#execute()
 */
@Override
public void execute() throws BuildException {
	// See if this is a slave plugin
	boolean slavePlugin = getProject().getProperty("slave.plugin").equalsIgnoreCase("true");
	FileSet slaveFiles = (FileSet)getProject().getReference("slave.fileset");
	// Run the actual Jar process
	super.execute();
	// Log created file if needed
	if (slavePlugin) {
		File jarFile = getDestFile();
		String installDir = getProject().getProperty("installdir");
		String relativePath = jarFile.getPath().substring(installDir.length()+1);
		slaveFiles.appendIncludes(new String[]{relativePath});
	}
}
 
開發者ID:drftpd-ng,項目名稱:drftpd3,代碼行數:19,代碼來源:LoggingJarTask.java

示例4: toFileSet

import org.apache.tools.ant.types.FileSet; //導入方法依賴的package包/類
private FileSet toFileSet(boolean withPatterns) {
    FileSet fs = new FileSet();
    fs.setCaseSensitive(isCaseSensitive());
    fs.setFollowSymlinks(isFollowSymlinks());
    fs.setMaxLevelsOfSymlinks(getMaxLevelsOfSymlinks());
    fs.setProject(getProject());

    if (withPatterns) {
        PatternSet ps = mergePatterns(getProject());
        fs.appendIncludes(ps.getIncludePatterns(getProject()));
        fs.appendExcludes(ps.getExcludePatterns(getProject()));
        for (FileSelector sel : getSelectors(getProject())) {
            fs.appendSelector(sel);
        }
        fs.setDefaultexcludes(getDefaultexcludes());
    }
    return fs;
}
 
開發者ID:apache,項目名稱:ant,代碼行數:19,代碼來源:Sync.java

示例5: execute

import org.apache.tools.ant.types.FileSet; //導入方法依賴的package包/類
/**
 * @see org.apache.tools.ant.taskdefs.Copy#execute()
 */
@Override
public void execute() throws BuildException {
	// See if this is a slave plugin
	boolean slavePlugin = getProject().getProperty("slave.plugin").equalsIgnoreCase("true");
	FileSet slaveFiles = (FileSet)getProject().getReference("slave.fileset");
	// Run the actual Copy process
	super.execute();
	// Log copied file if needed
	if (slavePlugin) {
		String installDir = getProject().getProperty("installdir");
		String relativePath = (destDir.getPath()+File.separator+file.getName()).substring(installDir.length()+1);
		slaveFiles.appendIncludes(new String[]{relativePath});
	}
}
 
開發者ID:drftpd-ng,項目名稱:drftpd3,代碼行數:18,代碼來源:LoggingCopyTask.java

示例6: executeWriteSchemaToDB

import org.apache.tools.ant.types.FileSet; //導入方法依賴的package包/類
protected void executeWriteSchemaToDB(final CommandLine cmdLine,
    final String cmd, final String cmdDescKey) throws ParseException,
    SQLException {
  String[] schemaFileNames = null;
  boolean doDrops = false;
  boolean alterIdentityColumns = false;
  final DataSourceOptions dsOpts = new DataSourceOptions();
  TaskOptions resultTaskOpts, taskOpts = null;
  String verbosity = null;
  Iterator<?> iter = cmdLine.iterator();
  GfxdOption opt;
  while (iter.hasNext()) {
    opt = (GfxdOption)iter.next();
    if (!handleDataSourceOption(opt, dsOpts)
        && !handleCommonOption(opt, cmd, cmdDescKey)) {
      if ((resultTaskOpts = handleCommonTaskOption(opt, false,
          taskOpts)) == null) {
        final String optName = opt.getOpt();
        if (FILE_NAMES.equals(optName)) {
          schemaFileNames = opt.getValue().split(",");
        }
        else if (DO_DROPS.equals(optName)) {
          doDrops = true;
        }
        else if (ALTER_IDENTITY_COLUMNS.equals(optName)) {
          alterIdentityColumns = true;
        }
        else {
          verbosity = handleVerbosityOption(opt);
        }
      }
      else if (taskOpts == null) {
        taskOpts = resultTaskOpts;
      }
    }
  }
  BasicDataSource dataSource = handleDataSourceOptions(dsOpts, cmd,
      cmdDescKey);
  final DdlToDatabaseTask toDBTask = new DdlToDatabaseTask();
  if (verbosity != null) {
    toDBTask.setVerbosity(new VerbosityLevel(verbosity));
  }
  toDBTask.addConfiguredDatabase(dataSource);
  if (schemaFileNames.length == 1) {
    File schemaFile = new File(schemaFileNames[0]);
    toDBTask.setSchemaFile(schemaFile);
  }
  else {
    FileSet schemaFileSet = new FileSet();
    schemaFileSet.appendIncludes(schemaFileNames);
    toDBTask.addConfiguredFileset(schemaFileSet);
  }
  setCommonTaskOptions(toDBTask, taskOpts);

  WriteSchemaToDatabaseCommand writeSchemaToDB =
      new WriteSchemaToDatabaseCommand();
  if (doDrops) {
    writeSchemaToDB.setDoDrops(true);
    writeSchemaToDB.setAlterDatabase(false);
  }
  else {
    writeSchemaToDB.setAlterDatabase(true);
  }
  writeSchemaToDB.setAddIdentityUsingAlterTable(alterIdentityColumns);
  writeSchemaToDB.setFailOnError(true);

  toDBTask.addWriteSchemaToDatabase(writeSchemaToDB);
  toDBTask.execute();
}
 
開發者ID:gemxd,項目名稱:gemfirexd-oss,代碼行數:70,代碼來源:GfxdDdlUtils.java


注:本文中的org.apache.tools.ant.types.FileSet.appendIncludes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。