Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-463

Setting a system property in the buildfile causes a NoClassDefFoundError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 1.4.1
    • Core features
    • None
    • MRI 1.8.7-p174
      (does not happen on JRuby)

    Description

      If a buildfile sets a system property like so:

      Java.java.lang.System.setProperty("foo", "bar")

      a subsequent attempt to run JUnit tests will fail with a NoClassDefFoundError for org/apache/buildr/JavaTestFilter. A minimal project which demonstrates this can be found in this gist: http://gist.github.com/460611 . Clone it and then run `buildr clean test` to replicate.

      This worked in 1.3.5. It continues to work in 1.4.0 in JRuby, but not in MRI.

      (Apologies for not catching this in an RC – most of my prerelease testing was with a different project that didn't do this.)

      Attachments

        Activity

          People

            toulmean Antoine Toulme
            rsutphin Rhett Sutphin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: