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

Main artifact jar not present on test class path for tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0.0-M5
    • 3.0.0-M6
    • Maven Failsafe Plugin
    • None

    Description

      While trying to troubleshoot https://github.com/apache/accumulo/issues/2555, I noticed that there was a behavior change between 3.0.0-M4 and 3.0.0-M5 that causes the main artifact jar to be missing from the class path in test cases. I was able to verify that by printing out System.getProperty("java.class.path") before and after switching to M5, and confirmed that the jar was missing after switching.

      For some reason, unit tests still seem to work okay, though I can't figure out why. However, if I try to launch a process using Java's ProcessBuilder using the same class path from System.getProperty("java.class.path"), that process fails with ClassNotFoundException, failing to find classes that should definitely be present on the class path from the main artifact.

      Attachments

        1. surefire-2035-example-main.zip
          8 kB
          Christopher Tubbs

        Activity

          People

            sjaranowski Slawomir Jaranowski
            ctubbsii Christopher Tubbs
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: