CompileWithTargetClassAccessClassLoader is currently only used within the CompileWithTargetClassAccessExtension which is dedicated to JUnit Jupiter support which in turn should not have any direct dependencies on Hamcrest. In other words, the JupiterTestEngine should not load any Hamcrest types that would cause issues with the CompileWithTargetClassAccessClassLoader.