Package org.apache.tools.ant.taskdefs

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


          fileSet.setDir(new File(paths[i]));
          fileSet.setIncludes("**/*");
          fileSet.setExcludes(sourceRootCopyFilter);
          copy.addFileset(fileSet);
        }
        copy.execute();
      }
    }
    if ((null != inpathDirCopyFilter) && (null != inpath)) {
      String[] paths = inpath.list();
      if (!LangUtil.isEmpty(paths)) {
View Full Code Here


            fileSet.setExcludes(inpathDirCopyFilter);
            copy.addFileset(fileSet);
          }
        }
        if (gotDir) {
          copy.execute();
        }
      }
    }
  }
View Full Code Here

                        cp.addFileset(src);
                        cp.setOverwrite(true);
                        cp.setPreserveLastModified(true);
                        cp.setFailOnError(false); // keep going even if
                                                    // there's an error
                        cp.execute();

                        // try to delete as much as possible
                        try {
                            Util.deleteRecursive(oldRoot);
                        } catch (IOException e) {
View Full Code Here

        Copy cp = new Copy();
        cp.setProject(new org.apache.tools.ant.Project());
        cp.setTofile(dst);
        cp.setFile(src);
        cp.setOverwrite(true);
        cp.execute();
    }

    /**
     * Convert null to "".
     */
 
View Full Code Here

        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) {
        Project p = new Project();
        Copy c = new Copy();
View Full Code Here

        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

        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();
        } else {
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 copy = (Copy) antProject.createTask("copy");
            copy.setFile(new File(sourceDirectory + "/src/main/resources/sqlmaps/" + pojoName + "SQL.xml"));
            copy.setTodir(new File(destinationDirectory + "/src/main/resources/sqlmaps"));
            copy.execute();

            // Add compass gps bean if it doesn't exist
            File ctx = new File(destinationDirectory + "/src/main/webapp/WEB-INF/applicationContext.xml");
            try {
                File appCtx = new File(destinationDirectory + "/src/main/webapp/WEB-INF/applicationContext.xml");
View Full Code Here

    private void installJSFViews() {
        Copy copy = (Copy) antProject.createTask("copy");
        copy.setFile(new File(sourceDirectory + "/src/main/webapp/" + pojoName + "Form.xhtml"));
        copy.setTofile(new File(destinationDirectory + "/src/main/webapp/" + pojoNameLower + "Form.xhtml"));
        copy.execute();

        copy.setFile(new File(sourceDirectory + "/src/main/webapp/" + pojoName + "s.xhtml"));
        copy.setTofile(new File(destinationDirectory + "/src/main/webapp/" + util.getPluralForWord(pojoNameLower) + ".xhtml"));
        copy.execute();
    }
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.