Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1476

useSystemClassLoader=false doesn't work as expected after 2.8.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • waiting-for-feedback
    • None
    • None

    Description

      I have a test case where I want to load a bunch of jars in a custom classloader, and check that they are isolated from the classes in the classloader within which the test is running. This is for BC testing elsewhere in my code.

       

      See

      https://github.com/ivankelly/bookkeeper/blob/faa9f6db6f6861b9579be441227621bb06f0fac8/tests/integration-tests-utils/pom.xml

       

      Run test in that module to see it work correctly. Change the surefire plugin to a newer version to see it fail. The problem seems to be that all dependencies are being added to the classpath of the forked processes, so no matter what happens, they are in the system class loader.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ikelly Ivan Kelly
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: