Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scala sbt从0.13.0迁移到1.3.0_Scala_Sbt - Fatal编程技术网

Scala sbt从0.13.0迁移到1.3.0

Scala sbt从0.13.0迁移到1.3.0,scala,sbt,Scala,Sbt,将sbt从0.13.0迁移到1.3.0时出错。我目前面临的问题是错误:找不到:值scriptClasspath 迁移后我的build.sbt文件 val main = (project in file(".")). settings( appName = "polaris", appVersion = "1.strong text8.8", //scri

将sbt从0.13.0迁移到1.3.0时出错。我目前面临的问题是错误:找不到:值scriptClasspath

迁移后我的build.sbt文件

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
    )
我还附上了plugin.sbt文件-

// 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")

迁移时我做错了什么?我无法找出一个语法错误。

这是第一个看起来像线索的错误:

错误:value+:不是sbt.io.PathFinder scriptedClasspath~={cp=>“模块/”+:“客户模块/”+:cp}的成员

它说
scriptedClasspath
是一个
PathFinder
,您试图向它添加元素,就像它是一个
Seq[String]
一样

阅读有关如何使用的文档,并查看
PathFinder
类型的

最可能的情况是,您需要将其调整为

scriptedClasspath~={pathFinder=>
探路者+++
(baseDirectory.value/“模块”)++
(baseDirectory.value/“客户模块”)
}

project/文件夹中是否有此
plugins.sbt
文件?这个
scriptClasspath
来自哪里?是的,
plugins.sbt
project
文件夹下,而
scriptClasspath
来自
build.sbt
project
文件夹下。根据下面的sbt指南,我将文件名从
Build.scala
更改为
Build.sbt
Build.sbt
应该在根文件夹中,而不是
project/
。这是
scriptedClasspath
而不是
scriptClasspath
,我想hi@laughedelic,谢谢你的回复。但是我已经试过了,我得到了错误-
error:value+:不是sbt.io.PathFinder scriptedClasspath的成员。={cp=>“模块/”+:“客户模块/”+:cp}
^Hi@laugedelic,目前我得到的错误如下-
scriptClasspath={cp=>cp:+“模块/”:+“客户模块/”}[错误]对未定义设置的引用:[error][error]core/buildInfo from core/Compile/sourceGenerators(/polaris_sbt_upgrade_1.3.0/polaris upgrade sbt/modules/core/build.sbt:32)[error][error]scriptClasspath from scriptClasspath(/polaris_sbt_upgrade_1.3.0/polaris upgrade sbt/build 49)[error]
Hi laugedelic,我现在可以解决这个问题了。我试着通过引用您提供的文档来实现这一点,并且成功了<代码>def scriptedClasspath(基本:文件):PathFinder=(基本/“模块”)++(基本/“客户模块”)