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

Classloading problem for getting a resource

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.5.3 (2.1.3 plugin), 2.0 (2.2 plugin)
    • 2.3
    • None
    • None
    • Maven 2.0.4
      Windows XP

    Description

      We are using Betwixt and some of our unit tests fail when run using
      surefire, but run fine in IntelliJ or Maven 1. Betwixt looks for
      descriptors with the name of the class + .betwixt to control how
      something is written out in XML. It uses the construct:
      myClass.getResource() to find the .betwixt file.

      E.g. com.mycomp.MyClass -> com/mycomp/MyClass.betwixt

      We have a betwixt file for the java.util.Date class. However, betwixt
      seems to be unable to pick it up when using surefire. I have created a
      small test that shows the problem and have attached it.

      I tried with version 2.2 using different configurations (never, once, pertest) and with version 2.1.3 (default configuration)

      Attachments

        1. surefire-test.zip
          2 kB
          Wim Deblauwe
        2. workaround-for-fork.zip
          1 kB
          Mark Holster
        3. surefire-2.0-UseSystemClassLoader.patch
          2 kB
        4. maven-surefire-plugin-2.2-UseSystemClassLoader.patch
          1 kB

        Issue Links

          Activity

            People

              kenneyw kenneyw
              wim.deblauwe@gmail.com Wim Deblauwe
              Votes:
              8 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: