Intellij Idea 高于1.3.0的Sbt仍然会转到/home/ivy 2/local,用于解析器引用,而不是Coursier

cbjzeqam  于 2023-08-03  发布在  其他
关注(0)|答案(1)|浏览(157)

嗨,我有一个项目,突然有一些错误,当我做sbt加载命令。由于我的本地sbt是1.3.2,项目指定的sbt版本是1.5.0,所有版本都大于1.3.0,这个sbt项目应该转到Coursier缓存,但它转到home_dir/.ivy2来搜索所有jar。我的其他sbt项目与相同的配置工作得很好…
我尝试删除项目并重新派生一个,使Intellij缓存无效,使用jvm 8和jvm 11,将vm参数添加到Intellij sbt构建工具:

-Dsbt.override.build.repos=true
-Dsbt.coursier.home=/Users/userId/Library/Caches/Coursier

字符串
都不管用。。
这是我的项目设置:
来自cmd的sbt版本:1.3.2,
build.properties指定sbt.version=1.5.0
build.sbt中的scala版本是2.12.15
Intellij IDEA 2022.3.3(社区版),
sbt插件是2022.3.20
以下是触发sbt load时的日志详细信息:

/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java -Djline.terminal=jline.UnsupportedTerminal -Dsbt.log.noformat=true -Dfile.encoding=UTF-8 -Didea.managed=true -Dfile.encoding=UTF-8 -Didea.installation.dir=/Users/userName/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/223.8836.41/IntelliJ IDEA CE.app/Contents -jar /Users/userName/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/223.8836.41/IntelliJ IDEA CE.app.plugins/Scala/launcher/sbt-launch.jar   
[info] welcome to sbt 1.5.0 (Azul Systems, Inc. Java 11.0.13)   
[info] loading settings for project global-plugins from credentials.sbt,plugins.sbt ...   
[info] loading global plugins from /Users/userName/.sbt/1.0/plugins   
[info] loading settings for project bladelier-tools-build from plugins.sbt ...   
[info] loading project definition from /Users/userName/IdeaProjects/bladelier-tools/project   
[info] loading settings for project bladelierTools from build.sbt,release.sbt ...   
[info] resolving key references (13788 settings) ...   
GitDescribeOutput(GitRef(v3.1.8),GitCommitSuffix(1,78230b7a),GitDirtySuffix(+20230712-1013))   
[info] set current project to bladelier-tools (in build file:/Users/userName/IdeaProjects/bladelier-tools/)   
[warn] there are 3 keys that are not used by any other settings/tasks:   
[warn]   
[warn] * common / maintainer   
[warn]   +- /Users/userName/IdeaProjects/bladelier-tools/build.sbt:181   
[warn] * bladelierTools / Test / coverageEnabled   
[warn]   +- /Users/userName/IdeaProjects/bladelier-tools/build.sbt:7   
[warn] * bladelierTools / gitRemoteRepo   
[warn]   +- /Users/userName/IdeaProjects/bladelier-tools/build.sbt:47   
[warn]   
[warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check   
[warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key   
[info] sbt server started at local:///Users/userName/.sbt/1.0/server/c5dd0c64a5baeb389dda/sock   
[info] started sbt server   
sbt:bladelier-tools>   
;set _root_.scala.collection.Seq(historyPath := None,shellPrompt := { _ => "" }   
,SettingKey[_root_.scala.Option[_root_.sbt.File]]("sbtStructureOutputFile")   
in _root_.sbt.Global := _root_.scala.Some(_root_.sbt.file("/private/var/folders/v9/vbxmj8w54bn_9s_258z0z34c0000gq/T/sbt-structure.xml")),SettingKey[_root_.java.lang.String]   
("sbtStructureOptions")   
in _root_.sbt.Global := "download, resolveClassifiers")   
[info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile and 1 others.   
[info] The new values will be used by cleanKeepGlobs   
[info]  Run `last` for details.   
[info] Reapplying settings...   
GitDescribeOutput(GitRef(v3.1.8),GitCommitSuffix(1,78230b7a),GitDirtySuffix(+20230712-1013))   
[info] set current project to bladelier-tools (in build file:/Users/userName/IdeaProjects/bladelier-tools/)   
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/userName/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/223.8836.41/IntelliJ IDEA CE.app.plugins/Scala/repo/org/jetbrains/scala/sbt-structure-extractor_2.12_1.0/2022.3.1/sbt-structure-extractor-2022.3.1.jar   
[info] Reapplying settings...   
GitDescribeOutput(GitRef(v3.1.8),GitCommitSuffix(1,78230b7a),GitDirtySuffix(+20230712-1013))   
[info] set current project to bladelier-tools (in build file:/Users/userName/IdeaProjects/bladelier-tools/)   
[warn] sbt 0.13 shell syntax is deprecated; use slash syntax instead: Global / dumpStructure   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/reader-index_2.12/3.1.5/reader-index_2.12-3.1.5.pom   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/core_2.12/3.1.5/core_2.12-3.1.5.pom   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/standalone-indexer-common_2.12/3.1.5/standalone-indexer-common_2.12-3.1.5.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/core_2.12/3.1.5/core_2.12-3.1.5.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/standalone-indexer-common_2.12/3.1.5/standalone-indexer-common_2.12-3.1.5.pom   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/reader-index_2.12/3.1.5/reader-index_2.12-3.1.5.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/releases/com/companyXX/bladelier/standalone-indexer-common_2.12/3.1.5/standalone-indexer-common_2.12-3.1.5.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/releases/com/companyXX/bladelier/core_2.12/3.1.5/core_2.12-3.1.5.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/releases/com/companyXX/bladelier/reader-index_2.12/3.1.5/reader-index_2.12-3.1.5.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/releases/com/companyXX/bladelier/core_2.12/3.1.5/   
Downloading https://artifactory.qa.companyXX.com/artifactory/releases/com/companyXX/bladelier/reader-index_2.12/3.1.5/   
Downloading https://artifactory.qa.companyXX.com/artifactory/releases/com/companyXX/bladelier/standalone-indexer-common_2.12/3.1.5/   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/document-model_2.12/3.1.5/document-model_2.12-3.1.5.pom   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/document-model_2.12/3.1.5/document-model_2.12-3.1.5.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/projectA/common/common-io/1.12.48/common-io-1.12.48.pom   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/projectA/common/common-io/1.12.48/common-io-1.12.48.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/hadoop-utils_2.12/3.1.5/hadoop-utils_2.12-3.1.5.pom   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/bladelier/hadoop-utils_2.12/3.1.5/hadoop-utils_2.12-3.1.5.pom.sha1   
Downloading https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/projectA/tokenizer/tokenizer-api/2.6.19-RELEASE/tokenizer-api-2.6.19-RELEASE.pom   
...   
https://companyXXcentral.corp.companyXX.com/artifactory/companyXX.sbe.releases-nxrepository/…   
https://companyXXcentral.corp.companyXX.com/artifactory/companyXX.sbe.releases-nxrepository/…   
[error] stack trace is suppressed; run 'last common / coursierResolutions' for the full output   
[error] stack trace is suppressed; run 'last index-verifier / ssExtractDependencies' for the full output   
[error] stack trace is suppressed; run 'last index-comparator / ssExtractDependencies' for the full output   
[error] stack trace is suppressed; run 'last generic-tools / ssExtractDependencies' for the full output   
[error] stack trace is suppressed; run 'last index-dumper / ssExtractDependencies' for the full output   
[error] stack trace is suppressed; run 'last index-analyzer / ssExtractDependencies' for the full output   
[error] stack trace is suppressed; run 'last common / ssExtractDependencies' for the full output   
[error] stack trace is suppressed; run 'last byname-generator / ssExtractDependencies' for the full output   
[error] (common / coursierResolutions) coursier.ResolutionException: Encountered 17 error(s) in dependency resolution:   
[error]     com.companyXX.projectA.maven:maven-globalproperties:0.9.30:   
[error]         not found:   
[error]             /Users/userName/.ivy2/local/com.companyXX.projectA.maven/maven-globalproperties/0.9.30/ivys/ivy.xml   
[error]             https://repo1.maven.org/maven2/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom   
[error]         unauthorized:   
[error]             https://artifactory.qa.companyXX.com/artifactory/snapshots/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://artifactory.qa.companyXX.com/artifactory/releases/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://artifactory.qa.companyXX.com/artifactory/v3debt/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://artifactory.qa.companyXX.com/artifactory/central-cache/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://artifactory.qa.companyXX.com/artifactory/aggregator-nxrepository/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://companyXXcentral.corp.companyXX.com/artifactory/central/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://companyXXcentral.corp.companyXX.com/artifactory/snapshots/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://companyXXcentral.corp.companyXX.com/artifactory/releases/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://companyXXcentral.corp.companyXX.com/artifactory/thirdparty/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://companyXXcentral.corp.companyXX.com/artifactory/aggregator-nxrepository/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             http://companyXXcentral.corp.companyXX.com/artifactory/companyXX.sbe.3rdparty-nxrepository/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]             https://companyXXcentral.corp.companyXX.com/artifactory/companyXX.sbe.releases-nxrepository/com/companyXX/projectA/maven/maven-globalproperties/0.9.30/maven-globalproperties-0.9.30.pom (Artifactory Realm)   
[error]     junit:junit::   
[error]         not found:   
[error]             /Users/userName/.ivy2/local/junit/junit/ivys/ivy.xml   
[error]             https://repo1.maven.org/maven2/junit/junit//junit-.pom   
[error]         unauthorized:   
[error]             https://artifactory.qa.companyXX.com/artifactory/snapshots/junit/junit//junit-.pom (Artifactory Realm)   
[error]             https://artifactory.qa.companyXX.com/artifactory/releases/junit/junit//junit-.pom (Artifactory Realm)   
...
[error] Total time: 246 s (04:06), completed Jul 12, 2023, xx:xx:xx AM
[info] shutting down sbt server

xbp102n0

xbp102n01#

经过几次检查,这里是我发现帮助我解决这个问题

unauthorized:错误日志中的是这里的关键词,我在2个文件中有2个不同的领域,领域:artifactory.qa.companyXX.com

companyXXcentral.corp.companyXX.com,
第一个密码是有效的,而第二个是过时的,当更新第二个,问题就消失了。
但是错误信息对我来说真的很困惑,因为它一直在说/home/.ivy2/local/xxx/ivy. xml不存在,我想当sbt版本高于1.3.0时,它会使用Coursier缓存,当我解决问题时,我去/home/.ivy2/local/文件夹,错误日志中报告的那些丢失的文件也不存在...

相关问题