当前位置: 首页>>代码示例>>Java>>正文


Java Copy.addFileset方法代码示例

本文整理汇总了Java中org.apache.tools.ant.taskdefs.Copy.addFileset方法的典型用法代码示例。如果您正苦于以下问题:Java Copy.addFileset方法的具体用法?Java Copy.addFileset怎么用?Java Copy.addFileset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tools.ant.taskdefs.Copy的用法示例。


在下文中一共展示了Copy.addFileset方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copySet

import org.apache.tools.ant.taskdefs.Copy; //导入方法依赖的package包/类
private void copySet(LayoutFileSet set) {
    Copy task = new Copy();
    task.setTaskName("copy");
    task.setProject(getProject());
    String prefix = set.getPrefix(getProject());
    File target = prefix.length() > 0 ? new File(destDirectory, prefix + "/") : destDirectory;

    target.mkdirs();

    task.setTodir(target);
    LayoutFileSet unprefixed = (LayoutFileSet) set.clone();
    unprefixed.setPrefix("");

    task.addFileset(unprefixed);
    task.perform();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:RootContainer.java

示例2: copyFiles

import org.apache.tools.ant.taskdefs.Copy; //导入方法依赖的package包/类
/**
 * Move java or class files to temp files or moves the temp files back to
 * java or class files. This must be done because javac is too nice and
 * sticks already compiled classes and ones depended on in the classpath
 * destroying the compile time wall. This way, we can keep the wall up.
 * 
 * @param srcDir
 *            Directory to copy files from/to(Usually the java files dir or
 *            the class files dir)
 * @param fileset
 *            The fileset of files to include in the move.
 * @param moveToTempFile
 *            true if moving src files to temp files, false if moving temp
 *            files back to src files.
 * @param isJavaFiles
 *            true if we are moving .java files, false if we are moving
 *            .class files.
 */
private void copyFiles(File srcDir, File destDir, FileSet fileset) {

	fileset.setDir(srcDir);
	if (!srcDir.exists())
		throw new BuildException("Directory=" + srcDir + " does not exist", getLocation());

	// before we do this, we have to move all files not
	// in the above fileset to xxx.java.ant-tempfile
	// so that they don't get dragged into the compile
	// This way we don't miss anything and all the dependencies
	// are listed or the compile will break.
	Copy move = (Copy) getProject().createTask("SilentCopy");
	move.setProject(getProject());
	move.setOwningTarget(getOwningTarget());
	move.setTaskName(getTaskName());
	move.setLocation(getLocation());
	move.setTodir(destDir);
	// move.setOverwrite(true);
	move.addFileset(fileset);
	move.perform();
}
 
开发者ID:cniweb,项目名称:ant-contrib,代码行数:40,代码来源:CompileWithWalls.java

示例3: copyDirectory

import org.apache.tools.ant.taskdefs.Copy; //导入方法依赖的package包/类
public static void copyDirectory(File source, File dest) {
    Project p = new Project();
    Copy c = new Copy();
    c.setProject(p);
    c.setTodir(dest);
    FileSet fs = new FileSet();
    fs.setDir(source);
    c.addFileset(fs);
    c.execute();
}
 
开发者ID:epam,项目名称:Wilma,代码行数:11,代码来源:LauncherUtils.java

示例4: copyClassFiles

import org.apache.tools.ant.taskdefs.Copy; //导入方法依赖的package包/类
private void copyClassFiles(File jspCompileDir) {
    Copy copy = new Copy();
    copy.setProject(getProject());
    copy.setTaskName(getTaskName());
    destdir.mkdirs();
    copy.setTodir(destdir);
    FileSet files = new FileSet();
    files.setDir(jspCompileDir);
    files.setIncludes("**/*.class");
    copy.addFileset(files);
    copy.execute();
}
 
开发者ID:WASdev,项目名称:ci.ant,代码行数:13,代码来源:CompileJSPs.java

示例5: copyJars

import org.apache.tools.ant.taskdefs.Copy; //导入方法依赖的package包/类
void copyJars() {
    if (!parent.getLibs().isEmpty()) {
        Copy cp = createTask(Copy.class);
        cp.setTodir(javaDir);
        cp.setFlatten(true);

        for (FileSet fs : parent.getLibs()) {
            cp.addFileset(fs);
        }

        cp.execute();
    }
}
 
开发者ID:andrus,项目名称:japp-maven-plugin,代码行数:14,代码来源:JAppMacWorker.java


注:本文中的org.apache.tools.ant.taskdefs.Copy.addFileset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。