Package org.apache.tools.ant.taskdefs

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


            copy.setTodir(theConfDir);
            for (Iterator i = this.confFileSets.iterator(); i.hasNext();)
            {
                copy.addFileset((FileSet) i.next());
            }
            copy.execute();
        }
    }

}
View Full Code Here


        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

                    copy.init();
                    copy.setFile(new File(srcUrl.getFile()));
                    copy.setTofile(toFile);
                    copy.setPreserveLastModified(true);
                    copy.setTaskName("copy");
                    copy.execute();

                    results.add(new Result(url, Result.COPIED, srcUrl));
                    succeeded = true;
                }
                else {
View Full Code Here

        for (ArtifactOutput artifactOutput : ads) {

            File targetFile = artifactOutput.getOutputLocation(organisationDirectory, false);
            copy.setFile(artifactOutput.getSrcFile());
            copy.setTofile(targetFile);
            copy.execute();
            copy.init();
           
            if (artifactOutput.getSourceSrcFile() != null) {
                File targetSourceFile = artifactOutput.getOutputLocation(organisationDirectory, true);
                copy.setFile(artifactOutput.getSourceSrcFile());
View Full Code Here

           
            if (artifactOutput.getSourceSrcFile() != null) {
                File targetSourceFile = artifactOutput.getOutputLocation(organisationDirectory, true);
                copy.setFile(artifactOutput.getSourceSrcFile());
                copy.setTofile(targetSourceFile);
                copy.execute();
                copy.init();
            }
           
            String pomText = "<project xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n" +
              "<modelVersion>4.0.0</modelVersion>\n" +
View Full Code Here

            copy.setTodir(theConfDir);
            for (Iterator i = this.confFileSets.iterator(); i.hasNext();)
            {
                copy.addFileset((FileSet) i.next());
            }
            copy.execute();
        }
    }

}
View Full Code Here

        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();
        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

        Copy copy=new Copy();
        copy.setOverwrite(true);
        copy.setProject(prj);
        copy.setTodir(syncFolder);
        copy.setFile(new File(bundelName));
        copy.execute();
      }
    }
    return bundelName;
  }
  /***
 
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.