scala - sbt migration from 0.13.0 to 1.3.0
问题描述
I am getting error while migrating sbt from 0.13.0 to 1.3.0. I am currently facing issue in error: not found: value scriptClasspath.
My build.sbt file after the migration.
val main = (project in file(".")).
settings(
appName = "polaris",
appVersion = "1.strong text8.8",
//scriptClasspath := Seq("modules/*", "customer-modules/*")
// scriptClasspath = Seq[File] = file("modules/*") :: ("customer-modules/*") :: Nil
**scriptClasspath** ~= { cp => cp.+:("modules/*").+:("customer-modules/*") }
).dependsOn(
core, addressbook, pbx, pbxAppSoftphones, pbxAppCallLog, pbxAppQueues, pbxAppPhonebook, pbxAppClick2dial, pbxAppOperator
).aggregate(
core, addressbook, pbx, pbxAppSoftphones, pbxAppCallLog, pbxAppQueues, pbxAppPhonebook, pbxAppClick2dial, pbxAppOperator
)
and also I have attached plugin.sbt file below -
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
//resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
//resolvers += "Maven Central Server" at "https://repo1.maven.org/maven2"
resolvers += Resolver.url("bintray-sbt-plugins", url("http://dl.bintray.com/sbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.2")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.6")
What wrong am I doing while migration? there is a syntax error I am not able to figure out.
解决方案
This is the first error that looks like a lead:
error: value +: is not a member of sbt.io.PathFinder scriptedClasspath ~= { cp => "modules/" +: "customer-modules/" +: cp }
It says that scriptedClasspath
is a PathFinder
and you're trying to add elements to it as if it was a Seq[String]
.
Read the docs on how to work with Path Finders and see the Scaladoc for the PathFinder
type.
Most probably you will need to adjust it to something like
scriptedClasspath ~= { pathFinder =>
pathFinder +++
(baseDirectory.value / "modules") +++
(baseDirectory.value / "customer-modules")
}
推荐阅读
- maven - 无法从入门指南或使用 Maven 的示例源执行 Maven 目标以构建 Tapestry 5.4.x
- macos - Mac 上的 PgAdmin 4 在尝试恢复时看不到文件系统
- java - ElasticSearch 通过数组字段搜索作为排他搜索
- azure-devops - 在 CLI 任务中使用服务连接?
- python - 从自然语言字符串中提取日期
- git - 本地 Git 配置在 git clone 之后总是有不需要的文件模式设置
- vue.js - 如何在 Nuxtjs 应用程序中使用表情符号
- python - SQLite 更新或覆盖重复项
- mongodb - 在 mongodb 的给定字段上检索具有匹配值的文档
- python - 当您创建子类的实例时,也会创建其超类的实例,是否可以访问它?