Package org.apache.tools.ant.taskdefs

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


        Move moveTask = (Move) antProject.createTask("move");

        FileSet fileSet = AntUtils.createFileset(inSourceDirectory, inPattern, new ArrayList());
        moveTask.setTodir(new File(inDestinationDirectory));
        moveTask.addFileset(fileSet);
        moveTask.execute();
    }
    /**
     * This method will movie files from the source directory to the destination directory based on
     * the pattern.
     *
 
View Full Code Here


    protected void renameFile(final File from, final File to) {
        Move moveTask = (Move) antProject.createTask("move");

        moveTask.setFile(from);
        moveTask.setTofile(to);
        moveTask.execute();
    }

}
View Full Code Here

                                    fs.setDir(oldRoot);
                                    fs.setExcludes("war/**"); // we can't really move the exploded war.
                                    mv.addFileset(fs);
                                    mv.setTodir(installationDir);
                                    mv.setFailOnError(false); // plugins can also fail to move
                                    mv.execute();
                                }
                                LOGGER.info("Starting a Windows service");
                                StreamTaskListener task = StreamTaskListener.fromStdout();
                                int r = WindowsSlaveInstaller.runElevated(
                                        new File(installationDir, "jenkins.exe"), "start", task, installationDir);
View Full Code Here

        Mapper me = move.createMapper();
        me.setType(globType);
        me.setFrom("*" + fromExtension);
        me.setTo("*" + toExtension);

        move.execute();
    }

}
View Full Code Here

        Mapper me = move.createMapper();
        me.setType(globType);
        me.setFrom("*" + fromExtension);
        me.setTo("*" + toExtension);

        move.execute();
    }

}
View Full Code Here

    } else {
        fileSet.setFile(file);
    }
    task.addFileset(fileSet);
      }
      task.execute();
  } catch (BuildException e) {
      throw new IOException(e);
  }
    }
View Full Code Here

        Mapper me = move.createMapper();
        me.setType(globType);
        me.setFrom("*" + fromExtension);
        me.setTo("*" + toExtension);

        move.execute();
    }

}
View Full Code Here

  public static void moveFile(File from, File to) throws BuildException {
    logger.info(I18N.translate("move_file"), from, to);
    Move move = new Move();
    move.setFile(from);
    move.setTofile(to);
    move.execute();
  }
 
  public static void deleteDirectory(File directory) throws BuildException {
        logger.info(I18N.translate("delete_dir"), directory.getAbsolutePath());
        Delete delete = new Delete();
View Full Code Here

        Mapper me = move.createMapper();
        me.setType(globType);
        me.setFrom("*" + fromExtension);
        me.setTo("*" + toExtension);

        move.execute();
    }

}
View Full Code Here

          move.setFile(prefFileNew);
          move.setTofile(prefFile);
          move.setFailOnError(false);
          move.setForce(true);
          move.setOverwrite(true);
          move.execute();
        }catch(Exception e){
          logger.error("Error removing temp repositories.", e);
        }finally{
          IOUtils.closeQuietly(in);
          IOUtils.closeQuietly(out);
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.