amjr
amjr

Reputation: 301

Getting both Maven and SBT use local Artifactory-server

I need to get both Maven and SBT to use local Artifactory-server which is only machine that has Internet connection. Servers, CI-machine, etc don't have access to outside world.

I'm getting grey hair with SBT especially.

SBT Problems connecting to Artifactory

With 0.11.[0..3] I can SBT to access Artifactory via following:

With 0.12 or 0.13 versions I have no luck. I've tried with instructions found here: https://github.com/harrah/xsbt/pull/472. So I have done following:

But 0.12 and 0.13 refuse to access Artifactory but try to connect directly to typesafe, maven central etc.

Artifactory and problems when SBT does access it

Now for 0.11-series of SBT I can get it to connect to Artifactory. Then there is problem that SBT is unable to find packages it needs for compiling the project. Here is example:

==== local-artifactory-libs-snapshot: tried

  http://devserver:8081/artifactory/libs-snapshot/org/scala-sbt/compiler-interface/0.11.3/compiler-interface-src-0.11.3.jar

==== local-artifactory-libs-releases: tried

  http://devserver:8081/artifactory/libs-release/org/scala-sbt/compiler-interface/0.11.3/compiler-interface-src-0.11.3.jar

==== local-artifactory-plugins-releases: tried

  http://devserver:8081/artifactory/plugins-release/org/scala-sbt/compiler-interface/0.11.3/compiler-interface-src-0.11.3.jar

This must obviously be something related to Artifactory configuration. I would appreciate if someone has any pointers how and what repositories I should proxy with Artifactory in order to succesfully use it with SBT.

Upvotes: 7

Views: 5068

Answers (1)

Mad Dog
Mad Dog

Reputation: 593

I have the following scala-friendly repositories set up for our work environment:

The compiler interface you mentioned above is in the Typesafe repository, specifically

http://repo.typesafe.com/typesafe/maven-ivy-releases/org.scala-sbt/compiler-interface/0.11.3/

Upvotes: 4

Related Questions