1

I can access my Archiva maven repo in my local LAN just fine via Chrome or other browser (I can login and see the latest jar file and download but for some reason sbt does not do it. It's not behind a proxy but it is on a different subnet that firewall rules have allowed)

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

That URL is correct and when I click it, it immediately shows me the index of the application with all the versions.

Anybody else experience this? know what else to check? SBT is pretty basic.

build.sbt:

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

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

Thanks

dlite922
  • 1,924
  • 3
  • 24
  • 60
  • ALSO wget and curl can hit the url just fine. SBT, Y U NO WORK?! – dlite922 Jan 20 '17 at 22:58
  • What version of sbt are you using? Also try `resolvers += Resolver.url("mylocalmvnrepo", url("http://mylocalarchiva:8080/repository/internal/"))` instead – Naman Jan 21 '17 at 02:57

1 Answers1

0

Try changing

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

to

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

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

Source - Resolvers in sbt and Override default resolver

Naman
  • 27,789
  • 26
  • 218
  • 353