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.
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:
'repositories' file includes:
[repositories]
local
ivy-proxy: http://devserver:8081/artifactory/repo/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-proxy: http://devserver:8081/artifactory/repo/
I've included '-Dsbt.override.build.repos=true' in SBT's launch command which looks like this now:
java -Xms1536m -Xmx1536m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=192m -Dsbt.override.build.repos=true -Dsbt.global.base=/Users/amjr/.sbt/0.13.0-SNAPSHOT -jar /Users/amjr/.bin/.lib/0.13.0-SNAPSHOT/sbt-launch.jar
But 0.12 and 0.13 refuse to access Artifactory but try to connect directly to typesafe, maven central etc.
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.
Once you have created your Maven repository, go to Application | Artifactory | Artifacts, select your Maven repository and click Set Me Up. In the Set Me Up dialog, click Generate Maven Settings. You can now specify the repositories you want to configure for Maven.
Local repositories are physical, locally-managed repositories into which you can deploy artifacts. A remote repository serves as a caching proxy for a repository managed at a remote URL (which may itself be another Artifactory remote repository).
You would need to configure your build system to publish new artifacts to Artifactory. This is also straightforward if you're using a standard dependency management tool like Maven or Ivy, and is covered in the Artifactory docs.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With