You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hudson (Jira)" <ji...@apache.org> on 2020/03/28 15:05:02 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17069856#comment-17069856 ]
Hudson commented on MNG-6700:
-----------------------------
Build failed in Jenkins: Maven TLP » maven-studies » maven-metrics #4
See https://builds.apache.org/job/maven-box/job/maven-studies/job/maven-metrics/4/
> 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: 20m
> 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
(v8.3.4#803005)