跨多个Spark SBT项目制作可共享的代码 [英] Make shareable code across several Spark SBT projects
本文介绍了跨多个Spark SBT项目制作可共享的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些要在其他Spark项目中使用的代码.我正在使用sbt创建.jar文件.
I have some code that I want to use in different Spark projects. I'm using sbt to create the .jar file.
我看到了这个想法
将共享代码放入另一个构建自己的JAR的项目中 文件,并在两个项目中都使用它.
Put the shared code into a another project that builds its own JAR file, and use it in both projects.
但是那篇文章很老,而且还是专门针对Java的...我想知道我的情况是否有更好的方法.
But that post is old and also exclusively for Java... I'm wondering if there is a better way for my scenario.
推荐答案
我已经解决了此问题,并在build.sbt
文件中添加了以下内容:
I've solved this adding in the build.sbt
file the followings:
lazy val core = RootProject(file("../coreProject"))
val main = Project(id = "application", base = file(".")).dependsOn(core)
这篇关于跨多个Spark SBT项目制作可共享的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文