SBT assembly jar exclusion

前端 未结 2 406
借酒劲吻你
借酒劲吻你 2020-12-28 19:29

Im using spark (in java API) and require a single jar that can be pushed to the cluster, however the jar itself should not include spark. The app that deploys the jobs of co

2条回答
  •  北海茫月
    2020-12-28 20:09

    For beginners like me, simply add the % Provided to Spark dependencies to exclude them from an uber-jar:

    libraryDependencies += "org.apache.spark" %% "spark-core" % "1.4.0" % Provided
    libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.4.0" % Provided
    

    in build.sbt.

提交回复
热议问题