You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Roman Zenka (JIRA)" <ji...@apache.org> on 2015/07/01 16:11:05 UTC
[jira] [Created] (SPARK-8762) Maven build fails if the project is
in a symlinked folder
Roman Zenka created SPARK-8762:
----------------------------------
Summary: Maven build fails if the project is in a symlinked folder
Key: SPARK-8762
URL: https://issues.apache.org/jira/browse/SPARK-8762
Project: Spark
Issue Type: Bug
Components: Build
Affects Versions: 1.4.0
Environment: CentOS, Java 1.7, Maven 3.3.3
Reporter: Roman Zenka
Priority: Minor
Build was failing mysteriously in spark-core module with following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project spark-core_2.10: Compilation failure: Compilation failure:
[ERROR] /mnt/jenkins/var/lib/jenkins/jobs/apache.spark/workspace/core/src/main/scala/org/apache/spark/annotation/DeveloperApi.java:[35,8] error: duplicate class: org.apache.spark.annotation.DeveloperApi
[ERROR] /mnt/jenkins/var/lib/jenkins/jobs/apache.spark/workspace/core/src/main/scala/org/apache/spark/annotation/Experimental.java:[36,8] error: duplicate class: org.apache.spark.annotation.Experimental
[ERROR] /var/lib/jenkins/jobs/apache.spark/workspace/core/src/main/scala/org/apache/spark/annotation/AlphaComponent.java:[33,8] error: duplicate class: org.apache.spark.annotation.AlphaComponent
[ERROR] /var/lib/jenkins/jobs/apache.spark/workspace/core/src/main/scala/org/apache/spark/annotation/Private.java:[41,8] error: duplicate class: org.apache.spark.annotation.Private
[ERROR] -> [Help 1]
The /var/lib/jenkins folder is actually a symlink to /mnt/jenkins/var/lib/jenkins. This confuses the compiler that seems to resolve some paths and keep others intact, which leads to the same class appearing "twice" during the compilation.
The workaround is to always point the build to the physical folder, never build through a symlink. I have not determined the precise source of the error, but it is likely inside Maven.
The fix could be as easy as mentioning that this issue exists in the FAQ so others running into it can fix it instantly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org