1
votes

I've tried to follow the explanation to proxy ivy and sbt artifacts http://www.scala-sbt.org/1.x/docs/Proxy-Repositories.html

Nevertheless, it looks like SBT just ignores my settings, This is my environemnt:

Nexus 3.7.1 Several SBT versions (0.13.15 , 0.13.16, 1.0.0, 1.1.0) Several maven repositories which include the recommended repositories in the link that I've stated above.

Above these reposiroties I've 2 groups:

maven-public
ivy-public

which contain respectively the proper repositories (ivy to ivy, maven to maven)

I've created a settings file under ~/.sbt/repositories

[repositories]
  local
  mvn-repositories: https://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:8443/repository/maven-public/
  ivy-proxy-releases: https://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:8443/repository/ivy-public/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] 

And thats is, at this stage I expect to see sbt resolving artifacts via my nexus repository but I can see that it does not - here is a short snippet that shows that sbt-assembly didn't been grabbed from my nexus (fourth row):

[info] downloading https://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:8443/repository/maven-public/org/scala-sbt/logic_2.12/1.1.0/logic_2.12-1.1.0.jar ...
[info] downloading https://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:8443/repository/maven-public/org/scala-sbt/tasks_2.12/1.1.0/tasks_2.12-1.1.0.jar ...
[info] downloading https://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:8443/repository/maven-public/com/squareup/okhttp3/okhttp/3.7.0/okhttp-3.7.0.jar ...
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.14.6/jars/sbt-assembly.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#tasks_2.12;1.1.0!tasks_2.12.jar (1230ms)
[info] downloading https://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:8443/repository/maven-public/org/scala-sbt/testing_2.12/1.1.0/testing_2.12-1.1.0.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#logic_2.12;1.1.0!logic_2.12.jar (1259ms)
[info] downloading https://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:8443/repository/maven-public/org/scala-sbt/actions_2.12/1.1.0/actions_2.12-1.1.0.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#testing_2.12;1.1.0!testing_2.12.jar (818ms)
[info] downloading https://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com:8443/repository/maven-public/org/scala-sbt/util-tracking_2.12/1.1.2/util-tracking_2.12-1.1.2.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#actions_2.12;1.1.0!actions_2.12.jar (917ms)

I've tried several SBT versions, none did the job - I guess that I'm doing something wrong.

Help would be highly appreciated. Thanks !

1

1 Answers

1
votes

After hitting the wall for several days now, I've just solved it - it's all about nexus.

When you create your repository proxy, you MUST set the proxy layout policy to permissive, otherwise on restrict mode it won't accept the non-maven structure.

Don't forget to run your sbt with -Dsbt.override.build.repos=true