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

Maven Surefire should set system property java.class.path or something like surefire.java.class.path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.4
    • None
    • classloading
    • None

    Description

      In some of my test cases I fork another JVM instance that must have the same classpath as the executed test. I use the system property java.class.path to get the classpath.

      In Eclipse it works as expected, the system property java.class.path holds all the dependencies. But if I use Maven to run the tests, that system property holds just '/Users/mburger/bin/maven2/boot/classworlds-1.1.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/.compatibility/14compatibility.jar'.

      AFAIK the system property java.class.path is read only, so Surefire cannot set it. But it would be very nice to have some fall back like surefire.java.class.path. In my test cases I could use that system property as fall back when java.class.path does not contain the expected JAR files.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mburger Martin Burger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: