I have made the jars exposed on the system classloader configurable, like this
@TestSetup(
...
classpathFilter=@ClasspathFilter(
classes = {Blah.class}
maven= {
@MavenFilter(groupId="org.jboss.shrinkwrap", artifactId="shrinkwrap-api"),
@MavenFilter(groupId="org.jboss.shrinkwrap", artifactId="shrinkwrap-impl-base")})
)
@RunWith(ModularJunitTestRunner.class)
public class DemosTestCase {
One issue that occurred to me after doing this is that the the SystemLocalLoader only gets initialized once per jvm, so the first test to set this wins. Maybe this should happen at a higher level for the whole project? Maybe in a /system-classpath.properties or a package annotation for test's root package?