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

Surefire silently skips tests in presence of transitive dependency

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Invalid
    • 2.22.2
    • None
    • Maven Surefire Plugin
    • None

    Description

      In a multi-module project, one module "functional-tests" contains a test suite that tests the whole application.

      Usually, running mvn verify will run the tests in this module.

      [INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ functional-tests ---
      [WARNING] file.encoding cannot be set as system property, use <argLine>-Dfile.encoding=...</argLine> instead
      [INFO]
      [INFO] -------------------------------------------------------
      [INFO]  T E S T S
      [INFO] -------------------------------------------------------
      ...

      Recently, I added a dependency (io.vertx:vertx-config-git) to the pom.xml of one of my project's modules "config", and now mvn verify breezes through the functional-tests module without running any of the tests, and without logging anything noteworthy (even with the -X flag)

      [INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ functional-tests ---
      [INFO]
      [INFO] --- maven-dependency-plugin:2.8:copy-dependencies (copy-dependencies) @ functional-tests ---
      ...

       

      After adding a dependency:exclusion tag to the pom.xml of the "config" module that excludes a particular transitive dependency from vertx-config-git (org.eclipse.jgit:org.eclipse.jgit), the tests work as before. Obviously this is not a solution, but it seems to narrow down the problem. 

      Is it likely that my issue is caused by the presence of org.eclipse.jgit in my dependency tree? This seems counterintuitive.

       

      Attachments

        Activity

          People

            tibordigana Tibor Digana
            allenevans Allen Evans
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: