gpt4 book ai didi

scala - 对象插件不是包 sbtassembly 的成员

转载 作者:行者123 更新时间:2023-12-03 08:46:36 30 4
gpt4 key购买 nike

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

我的 project/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")
}

最佳答案

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

您可能需要将 sbtassembly.Plugin._AssemblyKeys._ 的导入替换为 sbtassembly.AssemblyPlugin.autoImport._ 以及按照建议更改设置格式。

关于scala - 对象插件不是包 sbtassembly 的成员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30470847/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com