Mojo's DbUnit Maven Plugin
  1. Mojo's DbUnit Maven Plugin
  2. MDBUNIT-7

DbUnit plugin fails to resolve data files when run from top-level directory

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      If you're using a single-module project with Maven 2, you can specify the sourceData property as follows:

      <sourceData>src/test/resources/sample-data.xml</sourceData>

      However, if you have a multi-module project, it seems you need to do:

      <sourceData>$

      {basedir}src/test/resources/sample-data.xml</sourceData>

      Normally, this isn't an issue. However, when you create an archetype with the ${basedir}

      property, it gets translated to the current directory when running "mvn archetype:create".

        Activity

        Hide
        Matt Raible added a comment -

        Of course, you can escape $

        {basedir} using \${basedir}

        , but this seems like it shouldn't be necessary.

        Show
        Matt Raible added a comment - Of course, you can escape $ {basedir} using \${basedir} , but this seems like it shouldn't be necessary.
        Hide
        Dan Tran added a comment -

        correct handling is to declare sourceData as File type to that $

        {basedir}

        is automatically injected. Fixed

        Show
        Dan Tran added a comment - correct handling is to declare sourceData as File type to that $ {basedir} is automatically injected. Fixed

          People

          • Assignee:
            Dan Tran
            Reporter:
            Matt Raible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: