【发布时间】:2020-01-05 00:01:58
【问题描述】:
我在将工件从一个项目发布到基于文件的存储库并将它们加载到另一个单独的项目中时遇到问题。
我可以在我的图书馆项目中使用此设置进行发布
ThisBuild/publishTo := Some(Resolver.file("file", new File( "c:/repository" ))(Resolver.mavenStylePatterns))
publish/skip := true
我也可以使用此设置发布
ThisBuild/publishTo := Some(Resolver.file("file", new File( "c:/repository" ))(Resolver.ivyStylePatterns))
当我尝试从另一个项目(带有子项目)中引用它时,我只是复制设置但将其应用到解析器。
ThisBuild/resolvers += Resolver.file("file", new File( "c:/repository" ))(Resolver.ivyStylePatterns)
相同的设置...
所以我们强制重新导入 intellij 并...
[warn] module not found: wonschemacore#wonschemacore_2.12;1.6
[warn] ==== local: tried
[warn] C:\Users\m_r_n\.ivy2\local\wonschemacore\wonschemacore_2.12\1.6\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/wonschemacore/wonschemacore_2.12/1.6/wonschemacore_2.12-1.6.pom
[warn] ==== local-preloaded-ivy: tried
[warn] C:\Users\m_r_n\.sbt\preloaded\wonschemacore\wonschemacore_2.12\1.6\ivys\ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:/C:/Users/m_r_n/.sbt/preloaded/wonschemacore/wonschemacore_2.12/1.6/wonschemacore_2.12-1.6.pom
[warn] ==== file: tried
[warn] c:\repository\wonschemacore\wonschemacore_2.12\1.6\ivys\ivy.xml
现在,最后一个警告看起来很有希望(对于 sbt!)所以我们寻找这个文件夹和文件,发现它不存在!
所以由于某种原因,发布似乎没有创建这些“常春藤”文件。
如果我使用 Maven 风格,
ThisBuild/resolvers += Resolver.file("file", new File( "c:/repository" ))(Resolver.mavenStylePatterns)
然后客户端应用程序甚至无法“尝试”我的附加解析器;
[warn] module not found: wonschemacore#wonschemacore_2.12;1.5
[warn] ==== local: tried
[warn] C:\Users\m_r_n\.ivy2\local\wonschemacore\wonschemacore_2.12\1.5\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/wonschemacore/wonschemacore_2.12/1.5/wonschemacore_2.12-1.5.pom
[warn] ==== local-preloaded-ivy: tried
[warn] C:\Users\m_r_n\.sbt\preloaded\wonschemacore\wonschemacore_2.12\1.5\ivys\ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:/C:/Users/m_r_n/.sbt/preloaded/wonschemacore/wonschemacore_2.12/1.5/wonschemacore_2.12-1.5.pom
[warn] ==== file: tried
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
所以这两种格式都不适合我。
有什么想法吗?
【问题讨论】:
标签: scala intellij-idea sbt