0
votes

I have added a assembly.sbt file to my project folder. I have not kept any sbt files in any of the modules. I do not get any error that could lead to a solution. Also, it is a Spark code written in Java. Running sbt assembly give me the following error:-

[error] Not a valid command: assembly
[error] Not a valid project ID: assembly
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: assembly
[error] assembly

When I run sbt package it creates empty jars with just META-INF.

And here is my build.sbt file:-

lazy val commonSettings = Seq(
  version := "1.0",
  scalaVersion := "2.10.5",
  ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
  compile in Compile := inc.Analysis.Empty,
  organization := "com.service.main",
)
  libraryDependencies ++= Seq(
    "com.google.code.gson" % "gson" % "2.3.1",
    "org.apache.spark" % "spark-core_2.10" % "1.5.2",
    "org.apache.spark" % "spark-sql_2.10" % "1.5.2",
    "org.apache.spark" % "spark-streaming_2.10" % "1.5.2",
    "org.apache.spark" % "spark-streaming-kafka_2.10" % "1.5.2",
    "com.databricks" % "spark-csv_2.10" % "1.3.0",
    "org.codehaus.janino" % "janino" % "2.7.8",
    "it.unimi.dsi" % "fastutil" % "7.0.6",
    "org.reflections" % "reflections" % "0.9.10",
    "org.elasticsearch" % "elasticsearch-spark_2.10" % "2.1.1",
    "junit" % "junit" % "4.8.1"
    //  "org.elasticsearch" % "elasticsearch-hadoop" % "2.1.1",
    //  "org.apache.kafka" % "kafka"  % "0.8.2.0" exclude("log4j", "log4j") exclude("org.slf4j","slf4j-log4j12")
  )
  resolvers ++= Seq(
    "Apache repo" at "https://repository.apache.org/content/repositories/releases",
    "Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/",
    "Akka Repository" at "http://repo.akka.io/releases/",
    "Apache HBase" at "https://repository.apache.org/content/repositories/releases",
    "scala-tools" at "https://oss.sonatype.org/content/groups/scala-tools",
    "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
    "Second Typesafe repo" at "http://repo.typesafe.com/typesafe/maven-releases/",
    "Mesosphere Public Repository" at "http://downloads.mesosphere.io/maven",
    Resolver.sonatypeRepo("public")
  )


lazy val root = project.in(file("."))
  .aggregate(core,common,provider,ooxp,model)
  .settings(commonSettings: _*)
  .settings(
    name := "compute-engine"
  )
  .dependsOn(core)
  .dependsOn(common)
  .dependsOn(model)
  .dependsOn(provider)
  .dependsOn(ooxp)

lazy val core = project.in(file("core"))
  .settings(commonSettings: _*)
  .settings(
    name := "core"
  )
  .dependsOn(provider)
  .dependsOn(common)

lazy val diff = project.in(file("diff"))
  .settings(commonSettings: _*)
  .settings(
    name := "diff"
  )
  .dependsOn(provider)
  .dependsOn(common)

lazy val provider = project.in(file("provider"))
  .settings(commonSettings: _*)
  .settings(
    name := "providers"
  )
  .dependsOn(ooxp)
  .dependsOn(model)
  .dependsOn(common)

lazy val ooxp = project.in(file("ooxp"))
  .settings(commonSettings: _*)
  .settings(
    name := "ooxp"
  )
  .dependsOn(model)
  .dependsOn(common)

lazy val model = project.in(file("model"))
  .settings(commonSettings: _*)
  .settings(
    name := "model"
  )
  .dependsOn(common)

lazy val common = project.in(file("common"))
  .settings(commonSettings: _*)
  .settings(
    name := "common"
  )
1
Maybe it should be build.sbt instead of built.sbt ?Rami
The file is named build.sbt. That was my mistake while writing the question.morfious902002

1 Answers

0
votes