[ 
https://issues.apache.org/jira/browse/MNG-6700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed MNG-6700.
-------------------------------
    Resolution: Fixed

Fixed with 
[84bf1877f0b54144edcb85094fe10302e236303e|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=84bf1877f0b54144edcb85094fe10302e236303e].

> Equal compile source roots are added multiple times
> ---------------------------------------------------
>
>                 Key: MNG-6700
>                 URL: https://issues.apache.org/jira/browse/MNG-6700
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.1
>         Environment: macOS 10.14.4 
> Oracle JDK 1.8.0_212
>            Reporter: zhb
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.6.2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 3.6.1 introduced a bug that same compile source are added multiple times.
> It seems that since 3.6.1, [this 
> method|https://github.com/apache/maven/blob/24c762d7c3d66607e620fddb0743c7eadd041107/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java#L855]
>  is invoked multiple times, thus adding project root directory absolute path 
> and "." [in this 
> method|https://github.com/apache/maven/blob/0940c7c9730eac23fd8598f3fb51520ee774761b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java#L295]
>  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 g...@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".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to