2

The official SBT documentation mentions own resolvers (link) from SBT point of view. The question is how to create own public server from whence dependencies can be downloaded (via resolvers from SBT).

Assuming having simple apache/php webhosting with domain, can I just place .jar files somewhere with some naming conventions and eventually use: (example)

resolvers += "My projects repos" at "http[s]://downloads.my-domain.tld/sbt"

If so, what are the naming conventions and best practice? If not, what is required? Does one need the access to *nix server? Should something be installed or configured?

Thanks for help

petrbel
  • 2,428
  • 5
  • 29
  • 49
  • 1
    I'm not sure but probably you should create your own maven repository. Example instruction is here: http://stackoverflow.com/questions/13834141/create-local-maven-repository. I don't do it, but probably it will works. – krynio Nov 10 '14 at 08:42
  • I don't understand - is maven repository just a bunch of files with some naming convention and structure? Or do I need some sophisticated server to serve? – petrbel Nov 10 '14 at 18:21
  • Here is some informations about publishing projects: http://www.scala-sbt.org/0.12.4/docs/Detailed-Topics/Publishing.html – krynio Nov 10 '14 at 19:56

2 Answers2

4

finally I solved it simply by adding this line to build.sbt

libraryDependencies += "org.mypack1.pack2" % "projectName" % "version" from "http://domain.tld/myLib.jar"
petrbel
  • 2,428
  • 5
  • 29
  • 49
0

We have Artifactory installed to host our own .jar files. It also allows us to keep .jar files private.

EECOLOR
  • 11,184
  • 3
  • 41
  • 75
  • This is definitely working possibility but don't you possibly know whether similar behavior can be achieved using only LAMP service? – petrbel Nov 10 '14 at 18:22
  • That is probably doable, please check the documentation here on custom layouts: http://www.scala-sbt.org/0.13/docs/Resolvers.html – EECOLOR Nov 10 '14 at 19:04