Package org.apache.tools.ant.taskdefs

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


        PatternSet patternSet = new PatternSet();
        patternSet.setProject(project);
        patternSet.setIncludes("**/*");
        patternSet.setExcludes("**/*.class");
        for (int i = 0; i < paths.length; i++) {
          Expand unzip = new Expand();
          unzip.setProject(project);
          unzip.setTaskName(taskName);
          unzip.setDest(destDir);
          unzip.setSrc(new File(paths[i]));
          unzip.addPatternset(patternSet);
          unzip.execute();
        }
      }
    }
    if ((null != sourceRootCopyFilter) && (null != sourceRoots)) {
      String[] paths = sourceRoots.list();
View Full Code Here


        if (!installMarker.exists()) {
            log.info("Installing assembly...");

            FileUtils.forceMkdir(geronimoHome);
           
            Expand unzip = (Expand)createTask("unzip");
            unzip.setSrc(assemblyArchive);
            unzip.setDest(installDirectory.getCanonicalFile());
            unzip.execute();

            // Make scripts executable, since Java unzip ignores perms
            Chmod chmod = (Chmod)createTask("chmod");
            chmod.setPerm("ugo+rx");
            chmod.setDir(geronimoHome);
View Full Code Here

        // delete the contents so that old files won't interfere with new files
        Util.deleteRecursive(destDir);

        try {
            Expand e = new Expand();
            e.setProject(new Project());
            e.setTaskType("unzip");
            e.setSrc(archive);
            e.setDest(destDir);
            e.execute();
        } catch (BuildException x) {
            throw new IOException2("Failed to expand " + archive,x);
        }

        try {
View Full Code Here

        if (!installMarker.exists()) {
            log.info("Installing assembly...");

            FileUtils.forceMkdir(geronimoHome);
           
            Expand unzip = (Expand)createTask("unzip");
            unzip.setSrc(assemblyArchive);
            unzip.setDest(installDirectory.getCanonicalFile());
            unzip.execute();

            // Make scripts executable, since Java unzip ignores perms
            Chmod chmod = (Chmod)createTask("chmod");
            chmod.setPerm("ugo+rx");
            chmod.setDir(geronimoHome);
View Full Code Here

        if (!installMarker.exists()) {
            log.info("Installing assembly...");

            FileUtils.forceMkdir(geronimoHome);
           
            Expand unzip = (Expand)createTask("unzip");
            unzip.setSrc(assemblyArchive);
            unzip.setDest(installDirectory.getCanonicalFile());
            unzip.execute();

            // Make scripts executable, since Java unzip ignores perms
            Chmod chmod = (Chmod)createTask("chmod");
            chmod.setPerm("ugo+rx");
            chmod.setDir(geronimoHome);
View Full Code Here

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

            Expand expand = new Expand();
            expand.setProject(project);
            expand.setSrc(new File(src));
            expand.setDest(new File(dest));
            expand.execute();

            if (err.toString().length() > 0)
            {
                return false;
            }
View Full Code Here

    }

    private void unzip() throws ActionHandlerException {
        try {
            // Use the ant unzip wrappers for simplicity of code
            Expand expander = new Expand();

            // Needed in order to get the ant logging (really notification of listeners) setup correctly,
            // i.e. so that it won't throw NPE's
            expander.setProject(new Project());

            expander.setSrc(new File(fileToBeUnzippedLocation));
            expander.setDest(new File(destinationDirectoryLocation));

            expander.execute();
        } catch (Exception e) {
            throw new ActionHandlerException("Failed trying to unzip ["
                + HandlerUtils.formatPath(fileToBeUnzippedLocation) + "] to ["
                + HandlerUtils.formatPath(destinationDirectoryLocation) + "].", e);
        }
View Full Code Here

        if (!installMarker.exists()) {
            log.info("Installing assembly...");

            FileUtils.forceMkdir(geronimoHome);
           
            Expand unzip = (Expand)createTask("unzip");
            unzip.setSrc(assemblyArchive);
            unzip.setDest(installDirectory.getCanonicalFile());
            unzip.execute();

            // Make scripts executable, since Java unzip ignores perms
            Chmod chmod = (Chmod)createTask("chmod");
            chmod.setPerm("ugo+rx");
            chmod.setDir(geronimoHome);
View Full Code Here

        if (!installMarker.exists()) {
            log.info("Installing assembly...");

            FileUtils.forceMkdir(geronimoHome);
           
            Expand unzip = (Expand)createTask("unzip");
            unzip.setSrc(assemblyArchive);
            unzip.setDest(installDirectory.getCanonicalFile());
            unzip.execute();

            // Make scripts executable, since Java unzip ignores perms
            Chmod chmod = (Chmod)createTask("chmod");
            chmod.setPerm("ugo+rx");
            chmod.setDir(geronimoHome);
View Full Code Here

        if (!installMarker.exists()) {
            log.info("Installing assembly...");

            FileUtils.forceMkdir(geronimoHome);
           
            Expand unzip = (Expand)createTask("unzip");
            unzip.setSrc(assemblyArchive);
            unzip.setDest(installDirectory);
            unzip.execute();

            // Make scripts executable, since Java unzip ignores perms
            Chmod chmod = (Chmod)createTask("chmod");
            chmod.setPerm("ugo+rx");
            chmod.setDir(geronimoHome);
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.taskdefs.Expand

Copyright © 2018 www.massapicom. 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.