Examples of Copy


Examples of org.apache.tools.ant.taskdefs.Copy

        copy.setTofile(new File(destinationDirectory + "/src/main/webapp/WEB-INF/pages/" + util.getPluralForWord(pojoNameLower) + ".jsp"));
        copy.execute();
    }

    private void installStrutsViews() {
        Copy copy = (Copy) antProject.createTask("copy");
        copy.setFile(new File(sourceDirectory + "/src/main/webapp/WEB-INF/pages/" + pojoName + "Form.jsp"));
        copy.setTofile(new File(destinationDirectory + "/src/main/webapp/WEB-INF/pages/" + pojoNameLower + "Form.jsp"));
        copy.execute();

        copy.setFile(new File(sourceDirectory + "/src/main/webapp/WEB-INF/pages/" + pojoName + "List.jsp"));
        copy.setTofile(new File(destinationDirectory + "/src/main/webapp/WEB-INF/pages/" + pojoNameLower + "List.jsp"));
        copy.execute();
    }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Copy

        copy.setTofile(new File(destinationDirectory + "/src/main/webapp/WEB-INF/pages/" + pojoNameLower + "List.jsp"));
        copy.execute();
    }

    private void installTapestryViews() {
        Copy copy = (Copy) antProject.createTask("copy");
        copy.setFile(new File(sourceDirectory + "/src/main/webapp/" + pojoName + "Form.tml"));
        copy.setTodir(new File(destinationDirectory + "/src/main/webapp"));
        copy.execute();

        copy.setFile(new File(sourceDirectory + "/src/main/webapp/" + pojoName + "List.tml"));
        copy.execute();

        log("Installing menu...");
        createLoadFileTask("src/main/webapp/" + pojoName + "-menu.tml", "tapestry-menu").execute();
        File existingFile = new File(destinationDirectory + "/src/main/resources/" +
                project.getGroupId().replace(".", "/") + "/webapp/components/Layout.tml");
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Copy

        try
        {
            err.clear();
            out.clear();

            Copy copy = new Copy();
            copy.setProject(project);

            File f = new File(file);
            if (f.isFile() == true)
            {
                copy.setTodir(new File(toDir));
                copy.setFile(f);
            }
            else
            {
                File dir = new File(toDir, f.getName());
                dir.mkdir();

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

Examples of org.apache.tools.ant.taskdefs.Copy

        try
        {
            err.clear();
            out.clear();

            Copy copy = new Copy();
            copy.setProject(project);

            File f = new File(file);
            copy.setTofile(new File(toFile));
            copy.setFile(f);
            copy.execute();
            return true;
        }
        catch (Exception ex)
        {
            return false;
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Copy

            createSymlink(scriptFile, link, this.overwriteLinks);
        }
    }

    private void copyFile(File sourceFile, File destFile, boolean overwrite) {
        Copy copyTask = new Copy();
        copyTask.setProject(getProject());
        copyTask.init();
        copyTask.setFile(sourceFile);
        copyTask.setTofile(destFile);
        copyTask.setOverwrite(overwrite);
        copyTask.execute();
    }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Copy

            }
        }

        if (!this.confFileSets.isEmpty())
        {
            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

Examples of org.apache.tools.ant.taskdefs.Copy

            computedConfigDir = this.configDir;
        }
       
        // Copy the default JBoss server config directory into our custom
        // server directory.
        Copy copy = new Copy();
        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");
        fileUtils.copyFile(getDeployableFile().getFile(),
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Copy

        copyArtifacts(ads);
    }

    private void copyArtifacts(ArtifactOutput[] ads) {
       
        copy = new Copy();
        copy.setProject(getProject());
        copy.setOwningTarget(this.getOwningTarget());
        copy.setPreserveLastModified(true);
       
        final File organisationDirectory = getOrganisationDirectory();
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Copy

                if ("file".equals(srcUrl.getProtocol())) {

                    //log("Copying if applicable " + srcUrl + " to file: " + toFile, Project.MSG_DEBUG);                   

                    Copy copy = new Copy();
                    copy.setProject(getProject());
                   
                    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

Examples of org.apache.tools.ant.taskdefs.Copy

        copyArtifacts(ads);
    }

    private void copyArtifacts(ArtifactOutput[] ads) {
       
        copy = new Copy();
        copy.setProject(getProject());
        copy.setOwningTarget(this.getOwningTarget());
        copy.setPreserveLastModified(true);
       
        final File organisationDirectory = getOrganisationDirectory();
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.