code: public static void copyFile(@Nonnull File src, @Nonnull File dst) throws BuildException {
          Copy cp = new Copy();
          cp.setProject(new org.apache.tools.ant.Project());
          cp.setTofile(dst);
          cp.setFile(src);
          cp.setOverwrite(true);
          cp.execute();
      }
docs: Copies a single file by using Ant.