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

running included tests does not include test dependencies

    XMLWordPrintableJSON

Details

    Description

      When using the test-jar functionality, the test dependencies declared in the test jar are not added to the runner's classpath, leading to NoClassDefFoundErrors (or silent failures to match annotations on any test methods) when running the client project. Explicitly declaring a dependency on the upstream project does not help. Overriding the dependency scope on the upstream's dependencies to compile causes the client project to resolve the dependencies.

      I expected the client project to pull in the test dependencies needed by the upstream project when running its tests.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chrylis Christopher Smith
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: