You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2019/07/06 16:31:00 UTC
[jira] [Updated] (MNG-6700) Equal compile source roots are added
multiple times
[ https://issues.apache.org/jira/browse/MNG-6700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov updated MNG-6700:
--------------------------------
Summary: Equal compile source roots are added multiple times (was: Compile source roots are added multiple times)
> 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
> 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 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".
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)