我已经安装 Spark 1.5 在 Ubuntu 14.04 LTS 上。
使用命令运行构建时 build/mvn -Dscala-2.11 -DskipTests clean package
我在项目 Spark SQL 期间收到以下构建错误:
[error] missing or invalid dependency detected while loading class file 'WebUI.class'.
[error] Could not access term eclipse in package org,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'WebUI.class' was compiled against an incompatible version of org.
[error] missing or invalid dependency detected while loading class file 'WebUI.class'.
[error] Could not access term jetty in value org.eclipse,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'WebUI.class' was compiled against an incompatible version of org.eclipse.
[warn] 22 warnings found
[error] two errors found
[error] Compile failed at Sep 18, 2015 6:09:38 PM [17.330s]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM ........................... SUCCESS [ 6.723 s]
[INFO] Spark Project Core ................................. SUCCESS [03:07 min]
...
[INFO] Spark Project Catalyst ............................. SUCCESS [ 58.166 s]
[INFO] Spark Project SQL .................................. FAILURE [ 19.912 s]
[INFO] Spark Project Hive ................................. SKIPPED
[INFO] Spark Project Unsafe ............................... SKIPPED
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
下面是我在文件
.bashrc
中的 env 变量export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
export SCALA_HOME=/usr/local/src/scala/scala-2.11.7
export PATH=$SCALA_HOME/bin:$PATH
export PATH=/home/ubuntu/apache-maven-3.3.3/bin:$PATH
export SPARK_HOME=/home/ubuntu/spark-1.5.0
export MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m"
更新:尝试使用 -Ylog-classpath 运行,但没有奏效:
Unable to parse command line options: Unrecognized option: -Ylog-classpath
最佳答案
就跑 ./dev/change-scala-version.sh 2.11
从你的 spark 目录将所有代码切换到 2.11。然后运行 mvn
(3.3.3+) 或 make-distribution.sh
设置好你的标志。
关于maven - Spark SQL 1.5 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32656734/