分享

eclipse maven Scala编译出错

Wyy_Ck 发表于 2017-2-24 12:14:27 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 2 11535
[mw_shl_code=shell,true][INFO] Scanning for projects...
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ helloworld ---
[INFO] Deleting D:\Improve\24.Scala\workspace\helloworld\target
[INFO]
[INFO] --- maven-scala-plugin:2.15.0:compile (default-cli) @ helloworld ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.java,**/*.scala,]
[INFO] excludes = []
[INFO] D:\Improve\24.Scala\workspace\helloworld\src\main\scala:-1: info: compiling
[INFO] Compiling 1 source files to D:\Improve\24.Scala\workspace\helloworld\target\classes at 1487909578577
[ERROR] D:\Improve\24.Scala\workspace\helloworld\src\main\scala\scala_helloworld\helloworld\Helloworld.scala:3: error: value apache is not a member of package org
[INFO] import org.apache.hadoop.conf.Configuration
[INFO]            ^
[ERROR] D:\Improve\24.Scala\workspace\helloworld\src\main\scala\scala_helloworld\helloworld\Helloworld.scala:4: error: value apache is not a member of package org
[INFO] import org.apache.spark.{SparkContext, SparkConf}
[INFO]            ^
[ERROR] D:\Improve\24.Scala\workspace\helloworld\src\main\scala\scala_helloworld\helloworld\Helloworld.scala:5: error: value apache is not a member of package org
[INFO] import org.apache.spark.rdd.RDD
[INFO]            ^
[ERROR] D:\Improve\24.Scala\workspace\helloworld\src\main\scala\scala_helloworld\helloworld\Helloworld.scala:6: error: value apache is not a member of package org
[INFO] import org.apache.spark.SparkContext._
[INFO]            ^
[ERROR] four errors found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.757 s
[INFO] Finished at: 2017-02-24T12:13:02+08:00
[INFO] Final Memory: 10M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.0:compile (default-cli) on project helloworld: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluen ... oExecutionException
[/mw_shl_code]

已有(2)人评论

跳转到指定楼层
sstutu 发表于 2017-2-24 12:36:25
D:\Improve\24.Scala\workspace\helloworld\src\main\scala\scala_helloworld\helloworld\Helloworld.scala:6: error: value apache is not a member of package org
看样子可能导包导错了

回复

使用道具 举报

Wyy_Ck 发表于 2017-2-24 14:30:31
sstutu 发表于 2017-2-24 12:36
D:\Improve\24.Scala\workspace\helloworld\src\main\scala\scala_helloworld\helloworld\Helloworld.scala ...

类似这种错误 应该怎么看呢

Description        Resource        Path        Location        Type
akka-actor_2.10-2.3.11.jar of FemaleInfoCollection build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.        FemaleInfoCollection                Unknown        Scala Version Problem


Description        Resource        Path        Location        Type
akka-remote_2.10-2.3.11.jar of FemaleInfoCollection build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page.        FemaleInfoCollection                Unknown        Scala Version Problem



我本地安装的Scala是2.11.8


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条