object Plugin不是包sbtassembly的成员

时间:2015-05-26 23:45:40

标签: scala sbt

我正在尝试将我的sbt-assebly插件升级到0.13.0。同时,我将sbt从0.13.5升级到0.13.6。当我尝试导入sbt汇编键时,我得到object Plugin is not a member of package sbtassembly

我的项目/ plugins.sbt文件中列出了插件

我做错了什么?

这是我的project/plugins.sbt文件:

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

resolvers +=  "Typesafe snapshots" at "http://repo.typesafe.com/typesafe/snapshots/"

resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)

resolvers += Classpaths.sbtPluginReleases

addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")

addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-uglify" % "1.0.3")

addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.0.0")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")

这是我的Build.scala

import sbt.Keys._
import sbt._
import play._
import play.Play.autoImport._
import PlayKeys._

object GwBuild extends Build {

  import Dependencies._
  import ProjectDefs._

  lazy val root = gwRootProject(common, api, crowdsourced, ingestion, users, email, website, adminSite).enablePlugins(PlayScala)

  lazy val pingy = gwProject("pingy")(
  Seq(sprayHttpx, akkaActor, sprayCan, sprayRouting) :_*
  )

  lazy val api = gwProject("api")(ws, akkaActor)
    .dependsOn(common % "compile->compile;test->test", users % "compile->compile;test->test")

  lazy val sslRedirect = gwProject("ssl_redirect")()
    .aggregate(common)
    .dependsOn(common % "compile->compile;test->test", users % "compile->compile;test->test")

  lazy val crowdsourced = gwProject("crowdsourced")()
//    .settings(assembly := Some("com.grasswire.crowdsourced.app.CrowdsourcedService"))
    .dependsOn(common % "compile->compile;test->test", users % "compile->compile;test->test")

  lazy val ingestion = gwProject("ingestion")(
    akkaDeps
      ++ Seq(sprayClient, `scalaz-stream`, ws): _*)
    .aggregate(common)
    .dependsOn(common % "compile->compile;test->test")
//    .settings(mainClass in assembly := Some("com.grasswire.ingestion.app.IngestionService"))

  lazy val users = gwProject("users")()
    .aggregate(common, email)
    .dependsOn(common % "compile->compile;test->test", email % "compile->compile;test->test")

  lazy val email = gwProject("email")(sendgrid)
    .aggregate(common)
    .dependsOn(common % "compile->compile;test->test")

  lazy val common = gwProject("common")(
    Seq(scalaz, `scalaz-concurrent`, `scalaz-stream`, slf4j, typesafeConfig, scalaz, scredis, elastic4s,
      slick, sprayHttpx, postgresdriver, json4sNative, json4sext, jodaTime, swaggerCore, spraySwagger,
      jodaConvert, bcrypt, rabbitMQClient, playJson, ws, hikariCP, scalatest) ++ sprayDeps: _*)

  lazy val website = Project(id = "website", base = file("website")).settings(
    name := """grasswire-website""",
    version := "1",
    scalaVersion := Dependencies.myScalaVersion,
    libraryDependencies ++= Seq(
      filters,
      cache,
      ws,
      "com.twitter" % "twitter-text" % "1.12.1",
      "com.mohiva" %% "play-html-compressor" % "0.3",
      "com.wordnik" %%  "swagger-play2" %   "1.3.12",
      "com.wordnik" %%  "swagger-play2-utils" % "1.3.12"

  )
  ).enablePlugins(PlayScala)
    .aggregate(common)
    .dependsOn(common % "compile->compile;test->test")

  lazy val adminSite = Project(id = "admin-website", base = file("admin-site")).settings(
    name := """grasswire-admin-site""",
    version := "1",
    scalaVersion := Dependencies.myScalaVersion,
    libraryDependencies ++= Seq(
      filters,
      cache,
      ws
    )
  ).enablePlugins(PlayScala)
    .aggregate(common)
    .dependsOn(common % "compile->compile;test->test")
}    

1 个答案:

答案 0 :(得分:0)

请查看此页面,它会显示此程序包的迁移https://github.com/sbt/sbt-assembly/blob/master/Migration.md

您可能需要将sbtassembly.Plugin._AssemblyKeys._的导入替换为sbtassembly.AssemblyPlugin.autoImport._,并根据建议更改设置格式。