Maven 1.x Test Plugin
  1. Maven 1.x Test Plugin
  2. MPTEST-55

When forking Junit add his own "old" version of Xerces to classpath that may fail the tests

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Labels:
      None
    • Environment:
      Maven 1.0.2 & Maven 1.1
      Xerces 2.7.1
      jdk 1.4.2_08
    • Number of attachments :
      1

      Description

      While using junit in fork mode with tests which need Xerces 2.7.1 (Xinclude), the tests fails.
      The cause of the failures is the presence of xerces-2.4.jar in classpath (which is a dependency of maven-test-plugin).
      I attach a small patch with a new property "maven.junit.forkWithoutXerces" initialized to false (so the comportement of the plugin is the same). And when this property is set to yes xml-apis and xerces are not added to classpath even when fork is true.

        Activity

        Hide
        Brett Porter added a comment -

        applied, thanks!

        I also added documentation, and renamed the property to maven.test.excludeXmlApis.

        Another solution that you might like to try and replace this with would be to check for the existence of xerces/xml-apis in the dependency list and only add them if they were not there.

        Show
        Brett Porter added a comment - applied, thanks! I also added documentation, and renamed the property to maven.test.excludeXmlApis. Another solution that you might like to try and replace this with would be to check for the existence of xerces/xml-apis in the dependency list and only add them if they were not there.

          People

          • Assignee:
            Brett Porter
            Reporter:
            Eric Hartmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: