예제 #1
0
  /**
   * This method will create an ANT based LoadFile task based on an infile and a property name. The
   * property will be loaded with the infile for use later by the Replace task.
   *
   * @param inFile The file to process
   * @param propName the name to assign it to
   * @return The ANT LoadFile task that loads a property with a file
   */
  protected LoadFile createLoadFileTask(String inFile, String propName) {
    LoadFile loadFileTask = (LoadFile) antProject.createTask("loadfile");
    loadFileTask.init();
    loadFileTask.setProperty(propName);
    loadFileTask.setSrcFile(new File(inFile));

    return loadFileTask;
  }