Maven 1.x Eclipse Plugin
  1. Maven 1.x Eclipse Plugin
  2. MPECLIPSE-36

[PATCH] JUnit jar not add in a specific condition

    Details

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

      Description

      If your project doesn't have a <unitTestSourceDirectory> in the POM, the JUnit jar is never included, even if it used by other classes (like Cactus testcases). The reason is the following code:

      <j:when test="$

      {lib.dependency.groupId == 'junit' }

      ">
      <!-- ignoring junit dependency as we've already created it -->
      </j:when>

      This is not always true, because junit dependency is added inside the following statement:

      <j:if test="$

      {unitTestSourcesPresent}

      ">
      ....
      ....

      So, I'm providing a quick fix for this situation.

        Activity

        Hide
        Felipe Leme added a comment -

        A simple fix for this issue.

        Show
        Felipe Leme added a comment - A simple fix for this issue.
        Hide
        David Eric Pugh added a comment -

        Thanks for the patch.. I also added a unit test for this.

        Show
        David Eric Pugh added a comment - Thanks for the patch.. I also added a unit test for this.

          People

          • Assignee:
            David Eric Pugh
            Reporter:
            Felipe Leme
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 15 minutes
              15m
              Remaining:
              Remaining Estimate - 15 minutes
              15m
              Logged:
              Time Spent - Not Specified
              Not Specified