Package org.apache.tools.ant.taskdefs

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


        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");
        fileUtils.copyFile(getDeployableFile().getFile(),
View Full Code Here


            } else {
                anonFs.setFile(oFile);
            }
            copy.addFileset(anonFs);
        }
        copy.execute();
    }

}
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

          console.log("adding resource path {0}", path);
        }
      }
    }

    copy.execute();
  }

  protected FileSet prepareResourceSet(File dir) {
    FileSet set = new FileSet();
    set.setDir(dir);
View Full Code Here

            task.setFile(source);
            task.setTofile(dest);
        }
        task.setOverwrite(true);
        task.setPreserveLastModified(true);
        task.execute();
    }

    public void log(String msg) {
        project.log(msg);
    }
View Full Code Here

    copy.setTaskName(getTaskName());
    copy.setProject(getProject());
    copy.setTodir(toDir);
    copy.setVerbose(isVerbose());
    copy.add(fs);
    copy.execute();
   
    // add files to installed artifacts path
    reference(fs);
  }
 
View Full Code Here

    copy.setTaskName(getTaskName());
    copy.setProject(getProject());
    copy.setFile(sourceFile);
    copy.setTofile(targetFile);
    copy.setVerbose(isVerbose());
    copy.execute();
   
    // add target file to installed artifacts path
    reference(targetFile);
  }
 
View Full Code Here

                anonFs.setIncludes(m_includePattern);
            }
            anonFs.setDir(new File(dir));
            copy.addFileset(anonFs);
        }
        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.