docs: public void execute() throws BuildException {
          log.debug("execute()");
  
          command = command.trim();
  
          if (srcFile == null && command.length() == 0 && filesets.isEmpty()) {
              throw new BuildException("Source file does not exist!", getLocation());
          }
  
          if (srcFile != null && !srcFile.exists()) {
              throw new BuildException("Source file does not exist!", getLocation());
          }
  
          try {
              PrintStream out = System.out;
              try {
                  if (output != null) {
                      log.verbose("Opening PrintStream to output file " + output);
                      out = new PrintStream(
                              new BufferedOutputStream(
                                      new FileOutputStream(output.getAbsolutePath(), append)));
                  }
  
                  // if there are no groovy statements between the enclosing Groovy tags
                  // then read groovy statements in from a text file using the src attribute
                  if (command == null || command.trim().length() == 0) {
                      createClasspath().add(new Path(getProject(), srcFile.getParentFile().getCanonicalPath()));
                      command = getText(new BufferedReader(new FileReader(srcFile)));
                  }
  
                  if (command != null) {
                      execGroovy(command, out);
                  } else {
                      throw new BuildException("Source file does not exist!", getLocation());
                  }
  
              } finally {
                  if (out != null && out != System.out) {
                      out.close();
                  }
              }
          } catch (IOException e) {
              throw new BuildException(e, getLocation());
          }
  
          log.verbose("statements executed successfully");
      }