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

Equal compile source roots are added multiple times

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.1
    • Fix Version/s: 3.6.2
    • Component/s: core
    • Labels:
      None
    • Environment:
      macOS 10.14.4
      Oracle JDK 1.8.0_212

      Description

      3.6.1 introduced a bug that same compile source are added multiple times.

      It seems that since 3.6.1, this method is invoked multiple times, thus adding project root directory absolute path and "." in this method twice. Unfortunately, new File(basedir, ".").getAbsolutePath() doesn't equal basedir.getAbsolutePath() – the same source roots are added multiple times to compileSourceRoots.

       

      Step to reproduce:

      • git clone git@github.com:gradle/gradle.git
      • cd gradle/.teamcity
      • (With maven 3.6.0) mvn compile - success
      • (WIth maven 3.6.1) mvn compile - failure 

      Kotlin compiler complains a lot "Redeclaration: XXXXX".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                blindpirate zhb
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m