SBT保持当地Archiva Repo的时间安排

时间:2017-01-20 22:54:41

标签: maven connection timeout sbt archiva

我可以通过Chrome或其他浏览器在我的本地局域网中访问我的Archiva maven repo(我可以登录并查看最新的jar文件并下载但由于某种原因,sbt不会这样做。它不是代理的背后但是它在防火墙规则允许的不同子网上

[error] Server access Error: Operation timed out (Connection timed out) url=http://mylocalarchiva:8080/repository/internal/com/example/mypackage/myapp/

该URL是正确的,当我点击它时,它会立即显示包含所有版本的应用程序的索引。

其他人有此体验吗?知道还有什么要检查? SBT非常基础。

build.sbt:

resolvers ++= Seq(
  "mylocalmvnrepo" at "http://mylocalarchiva:8080/repository/internal/")

libraryDependencies ++= Seq(
  "com.example.mypackage" % "myapp" % "1.2.+",
  ...)

由于

1 个答案:

答案 0 :(得分:0)

尝试更改

resolvers ++= Seq(
   "mylocalmvnrepo" at "http://mylocalarchiva:8080/repository/internal/")

resolvers += Resolver.url("mylocalmvnrepo", 
   url("http://mylocalarchiva:8080/repository/internal/"))

externalResolvers <<= resolvers map { rs =>
   Resolver.withDefaultResolvers(rs, mavenCentral = false)
}

来源 - Resolvers in sbtOverride default resolver