code: private org.apache.tools.ant.types.Path addSlaveClasspath() {
      org.apache.tools.ant.types.Path path = new org.apache.tools.ant.types.Path(getProject());
  
      String [] REQUIRED_SLAVE_CLASSES = {
          SlaveMain.class.getName(),
          Strings.class.getName(),
          MethodGlobFilter.class.getName(),
          TeeOutputStream.class.getName()
      };
  
      for (String clazz : Arrays.asList(REQUIRED_SLAVE_CLASSES)) {
        String resource = clazz.replace(".", "/") + ".class";
        File f = LoaderUtils.getResourceSource(getClass().getClassLoader(), resource);
        if (f != null) {
          path.createPath().setLocation(f);
        } else {
          throw new BuildException("Could not locate classpath for resource: " + resource);
        }
      }
      return path;
    }
docs: Adds a classpath source which contains the given resource.
  
  TODO: [GH-213] this is extremely ugly; separate the code required to run on the
  forked JVM into an isolated bundle and either create it on-demand (in temp.
  files location?) or locate it in classpath somehow (in a portable way).