Hi all,
I'm creating an SBT plugin and I'm having some classloading issues running the 'scripted' tests.
[info] Caused by: java.lang.ClassNotFoundException: Could not find requested class "org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader" in any of the associated ClassLoaders: [sun.misc.Launcher$AppClassLoader
@43be2d65]
From the SBT plugin code, I've tried to do this:
Thread.currentThread().getContextClassLoader.loadClass("org.jboss.shrinkwrap.api.ShrinkWrap")
And I get:
[info] java.lang.ClassNotFoundException: org.jboss.shrinkwrap.api.ShrinkWrap
So, it would appear that the dependencies of the libraries are not added to the runtime classloader? Or maybe I'm doing this from the wrong classloader?
What would be the classloader to use here? I know I can configure ShrinkWrap with a classloader, but I've no idea where/how to retrieve it from SBT? I imagine there's some kind of classloader there cos the 1st stacktrace shows org.jboss.shrinkwrap.api classes being run.
I can share SBT plugin code if needed.
On top of this, one final question:
- How can you run scripted tests via a debugger? I've tried add remote debugging options to the SBT command, but it appears that a different JVM instance (forked?) is used for the scripted tests.
Thanks