Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6985

Incorrect value for maven.multiModuleProjectDirectory in integration tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Integration Tests
    • None

    Description

      The newVerifier() method in AbstractMavenIntegrationTestCase creates a System Property maven.multiModuleProjectDirectory and assigns the value of the basedir. That argument is passed in from the integration test and refers to the directory where the Maven invocation takes place (in Forked mode) or where it is simulated to take place (in Embedded mode).

      For the majority of the cases, this is a valid assumption. However, if the test is supposed to run in a child module of a multi-module project, this assumption does not hold. Instead, the value of this System Property should be determined in the same way as the mvn / mvn.cmd scripts do: by traversing up the file system until a .mvn directory is located.

      Attachments

        Issue Links

          Activity

            People

              mthmulders Maarten Mulders
              mthmulders Maarten Mulders
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: