axel22/scalameter — pull request #27 by Blaisorblade (2013-09-10 23:04:26+00:00)
Title: Fix on SBT 0.13 by recursing on the parent classloader

When searching for URLClassLoader, try falling back (recursively) on the parent classloader. This finds a classloader in the setup used by SBT 0.13.0, and it seems a sensible default heuristic in general.

Would you accept a backport to 0.3, since this fixes ScalaMeter with SBT 0.13?

Warnings:
* No testcase included, but it fixed a project of mine on SBT 0.13 (which uses a very non-minimal setup which I didn't write). I hope @VladUreche might have a better example project to try this on, since he opened #22.

* I think the fix itself should be straightforward and robust, and the testsuite still passes, but I very much didn't do enough testing (the fix itself took ~5 minutes, setting up testing would take me much more time).

* I overloaded `extractClasspath` for lack of fantasy (and because it looks reasonably appropriate here), you might prefer a different structure (for instance, inlining the existing `extractClasspath`). I'm happy to do it myself.

Fix axel22/scalameter#22.
Review by @VladUreche