Package org.apache.tools.ant.taskdefs

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


            }

            anonFs.setDir(new File(dir));

            copy.addFileset(anonFs);

        }

        copy.execute();
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 copy = new Copy();
        copy.setProject(antProject);
        copy.setTodir(theTargetDir);
        FileSet fileSet = new FileSet();
        fileSet.setDir(theSourceDir);
        copy.addFileset(fileSet);
        copy.execute();
    }

    /**
     * @return the path name element of the web application directory
View Full Code Here

        }
        //CactusPlugin.log(jspRedirectorURL.getPath());
        File jspRedirector = new File(jspRedirectorURL.getPath());
        FileSet fileSet = new FileSet();
        fileSet.setFile(jspRedirector);
        copy.addFileset(fileSet);
        copy.execute();
    }

    /**
     * copies files from a directory to another directory
View Full Code Here

        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

        Copy c = new Copy();
        c.setProject(p);
        c.setTofile(destFile);
        FileSet fs = new FileSet();
        fs.setFile(sourceFile);
        c.addFileset(fs);
        c.execute();
    }
   
    protected static void copyDirectory(File source, File dest) {
        Project p = new Project();
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

    if (StringUtils.isNotEmpty(includes)) {
      fileSet.setIncludes(includes);
    }

    copy.addFileset(fileSet);

    copy.setOverwrite(overwrite);
    copy.setPreserveLastModified(preserveLastModified);
    copy.setProject(AntUtil.getProject());
    copy.setTodir(destination);
View Full Code Here

    int count = 0;
    Enumeration<WOFileSet> en = resources.elements();
    while (en.hasMoreElements()) {
      WOFileSet wofs = (WOFileSet) en.nextElement();
      if (wofs.testIfCondition()) {
        cp.addFileset( wofs );
        count++;
      }
    }

    // if no filesets were added, then don't run copy
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.