Package org.apache.tools.ant.taskdefs

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


            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);
            chmod.setIncludes("bin/*.sh");
            chmod.execute();

            installMarker.createNewFile();
        }
        else {
            log.info("Re-using previously installed assembly");
View Full Code Here


            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);
            chmod.setIncludes("bin/*");
            chmod.setExcludes("bin/*.bat");
            chmod.execute();

            installMarker.createNewFile();
        }
        else {
            log.info("Re-using previously installed assembly");
View Full Code Here

            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);
            chmod.setIncludes("bin/*.sh");
            chmod.execute();

            installMarker.createNewFile();
        }
        else {
            log.info("Re-using previously installed assembly");
View Full Code Here

            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);
            chmod.setIncludes("bin/*");
            chmod.setExcludes("bin/*.bat");
            chmod.execute();

            installMarker.createNewFile();
        }
        else {
            log.info("Re-using previously installed assembly");
View Full Code Here

  /**
   * Returns a new Chmod task.
   */
  public Chmod getChmod() {
    Chmod task = new Chmod();
    initChildTask(task);
    return task;
  }
View Full Code Here

   */
  protected void chmodScripts() throws BuildException {
    if (System.getProperty("os.name").toLowerCase().indexOf("win") < 0) {
      File dir = null;
      FileSet fs = null;
      Chmod aChmod = null;
      try {
        dir = taskDir();
        super.log("chmod scripts in " + dir, Project.MSG_VERBOSE);

        fs = new FileSet();
        fs.setDir(dir);
        fs.createInclude().setName("**/" + name);
        if (startupScriptName != null) {
          fs.createInclude().setName("**/" + startupScriptName);
        }
        fs.createInclude().setName("**/*.sh");

        aChmod = this.getSubtaskFactory().getChmod();
        aChmod.setPerm(this.getChmod());
        aChmod.addFileset(fs);
        aChmod.execute();
      }
      finally {
        dir = null;
        fs = null;
        aChmod = null;
View Full Code Here

    Copy cp = (Copy) task.createSubtask(Copy.class);
    cp.setTodir(macOSDir);
    cp.setFile(stub);
    cp.execute();

    Chmod chmod = (Chmod) task.createSubtask(Chmod.class);
    chmod.setPerm("755");
    chmod.setFile(new File(macOSDir, "JavaApplicationStub"));
    chmod.execute();
  }
View Full Code Here

            /**
             * Set the file permissions
             */
            private boolean setFilePermissions(File file, String perms) {
                try {
                    Chmod chmod = new Chmod();
                    chmod.setProject(new Project());
                    chmod.setFile(file);
                    chmod.setPerm(perms);
                    chmod.execute();
                } catch (BuildException e) {
                    // if we failed to set the permission, that's fine.
                    LOGGER.log(Level.WARNING, "Failed to set permission of "+file,e);
                    return false;
                }
View Full Code Here

            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);
            chmod.setIncludes("bin/*");
            chmod.setExcludes("bin/*.bat");
            chmod.execute();

            installMarker.createNewFile();
        }
        else {
            log.info("Re-using previously installed assembly");
View Full Code Here

   * Private utility methods.
   **************************************************************************/

  private void setExecutable(File f) {

    Chmod chmodTask = new Chmod();
    chmodTask.setProject(getProject());
    chmodTask.setFile(f);
    chmodTask.setPerm("ugo+rx");

    if (mVerbose)
      log("Setting \"" + bundlePath(f) + "\" to executable");

    chmodTask.execute();

  }
View Full Code Here

TOP

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

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.