jm56

博客园 首页 新随笔 联系 订阅 管理

今日通过maven实现打包spark,通过运行spark最终获取结果。

中间遇到了一点小问题,主要是jdk的版本问题。

INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ simple-project --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to C:\Users\铭\Desktop\sparkapp\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] 不再支持源选项 5。请使用 7 或更高版本。 [ERROR] 不再支持目标选项 5。请使用 7 或更高版本。 [INFO] 2 errors [INFO] -------------------------------------------------------------

经过修改和查询资料,最后通过

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

解决问题,这个是重新定义jdk的版本,成功打包。

最后顺利运行spark。

posted on 2023-10-29 20:34  博客—铭  阅读(4)  评论(0编辑  收藏  举报