Package org.apache.tools.ant.taskdefs

Examples of org.apache.tools.ant.taskdefs.Copy.addFileset()


        for (int i = 0; i < paths.length; i++) {
          FileSet fileSet = new FileSet();
          fileSet.setDir(new File(paths[i]));
          fileSet.setIncludes("**/*");
          fileSet.setExcludes(sourceRootCopyFilter);
          copy.addFileset(fileSet);
        }
        copy.execute();
      }
    }
    if ((null != inpathDirCopyFilter) && (null != inpath)) {
View Full Code Here


            }
            FileSet fileSet = new FileSet();
            fileSet.setDir(inpathDir);
            fileSet.setIncludes("**/*");
            fileSet.setExcludes(inpathDirCopyFilter);
            copy.addFileset(fileSet);
          }
        }
        if (gotDir) {
          copy.execute();
        }
View Full Code Here

                        Copy cp = new Copy();
                        cp.setProject(new org.apache.tools.ant.Project());
                        cp.setTodir(newRoot);
                        FileSet src = new FileSet();
                        src.setDir(getRootDir());
                        cp.addFileset(src);
                        cp.setOverwrite(true);
                        cp.setPreserveLastModified(true);
                        cp.setFailOnError(false); // keep going even if
                                                    // there's an error
                        cp.execute();
View Full Code Here

        c.setProject(p);
        c.setTofile(destFile);
        FileSet fs = new FileSet();
        fs.setProject(p);
        fs.setFile(sourceFile);
        c.addFileset(fs);
        c.setOverwrite(overwrite);
        c.execute();
    }
   
    protected static void copyDirectory(File source, File dest) {
View Full Code Here

        Copy c = new Copy();
        c.setProject(p);
        c.setTodir(dest);
        FileSet fs = new FileSet();
        fs.setDir(source);
        c.addFileset(fs);
        c.execute();
    }
   
    /**
     * Copies all files matching the suffix to the destination directory.
View Full Code Here

        FileSet fs = new FileSet();
        fs.setDir(source);
        if (null != suffix) {
          fs.setIncludes("*" + suffix); // add the wildcard.
        }
        c.addFileset(fs);
        c.execute();
       
        // handle case where no files match; must create empty directory.
        if (!dest.exists()) {
          result = dest.mkdirs();
View Full Code Here

        Copy copyTask = (Copy) antProject.createTask("copy");

        FileSet fileSet = AntUtils.createFileset(inSourceDirectory, inPattern, new ArrayList());
        log("Installing generated files (pattern: " + inPattern + ")...");
        copyTask.setTodir(new File(inDestinationDirectory));
        copyTask.addFileset(fileSet);
        copyTask.execute();
    }

    private String pojoLowerCase(String name) {
        return name.substring(0, 1).toLowerCase() + name.substring(1);
View Full Code Here

                dir.mkdir();

                copy.setTodir(dir);
                FileSet fs = new FileSet();
                fs.setDir(f);
                copy.addFileset(fs);
            }
            copy.execute();
            return true;
        }
        catch (Exception ex)
View Full Code Here

        {
            Copy copy = (Copy) createAntTask("copy");
            copy.setTodir(theConfDir);
            for (Iterator i = this.confFileSets.iterator(); i.hasNext();)
            {
                copy.addFileset((FileSet) i.next());
            }
            copy.execute();
        }
    }
View Full Code Here

        copy.setTaskName("cactus");
        copy.setProject(getProject());
        copy.setTodir(theCustomServerDir);
        FileSet srcFiles = new FileSet();
        srcFiles.setDir(new File(computedConfigDir, this.config));
        copy.addFileset(srcFiles);
        copy.execute();
           
        // Deploy the web-app by copying the WAR file into the webapps
        // directory
        File deployDir = new File(theCustomServerDir, "/deploy");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.