Package org.apache.tools.ant.taskdefs

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


    int count = 0;
    Enumeration<WOFileSet> en = wsresources.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


    cp.setTodir(new File(resourcesDir(), "Java"));
    cp.setFlatten(true);

    Enumeration<FileSet> en = lib.elements();
    while (en.hasMoreElements()) {
      cp.addFileset((FileSet) en.nextElement());
    }
    cp.execute();
  }

  /**
 
View Full Code Here

      cp.setFlatten(true);

      Iterator it = task.getLibs().iterator();
      while (it.hasNext()) {
        FileSet fs = (FileSet) it.next();
        cp.addFileset(fs);
      }

      cp.execute();
    }
  }
View Full Code Here

          FileSet newFileSet = new FileSet();
          newFileSet.setDir(root);
          PatternSet.NameEntry include = newFileSet.createInclude();
          include.setName(directory + "/**");

          cp.addFileset(newFileSet);
          hasEmbeddedFrameworkSets = true;
        }
      }
      if (hasEmbeddedFrameworkSets) {
        cp.execute();
View Full Code Here

        if (includeName.endsWith("/") == false) {
          includeName = includeName + "/";
        }
        include.setName(includeName);

        cp.addFileset(newCs);
        hasSet = true;
      }
    }
    if (hasSet)
      cp.execute();
View Full Code Here

        task.setTodir(target);
        LayoutFileSet unprefixed = (LayoutFileSet) set.clone();
        unprefixed.setPrefix("");

        task.addFileset(unprefixed);
        task.perform();
    }

    public void validateArguments() throws BuildException {
        super.validateArguments();       
View Full Code Here

        // copy "website"
        Copy copy = new Copy();
        FileSet fileSet = new FileSet();
        fileSet.setDir(new File("test/repositories/packager/website"));
        copy.addFileset(fileSet);
        copy.setTodir(_websitedir);
        copy.setProject(new Project());
        copy.execute();
    }
View Full Code Here

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

    public static InputStream getSeleniumResourceAsStream(String resourceFile) {
        Class clazz = ClassPathResource.class;
View Full Code Here

            FilenameSelector fns = new FilenameSelector();
            fns.setName("**/*");
            FileSet fs = new FileSet();
            fs.setDir(source);
            fs.addFilename(fns);
            task.addFileset(fs);
            task.setTodir(dest);
            task.setIncludeEmptyDirs(true);
        } else {
            task.setFile(source);
            task.setTofile(dest);
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.