I'd like to use scala project in a closed networks. For this, I've tried to setup my local repository using ivy cache(~/.ivy2/cache
) as follow steps.
1. Collecting artifacts from the Ivy cache:
- Set
useCouriser := false
and built all of my projects. - Copied
~/.ivy2/cache/
to my local repository at/opt/sbt-repo/ivy
using the rsync command (rsync -av ~/.ivy2/cache/ /opt/sbt-repo/ivy/
).
2. Setting up the ~/.sbt/repositories
file:
- Updated the repositories file with the following content:
[repositories] local ivy-repo1: file:///opt/sbt/ivy/ ivy-repo2: file:///opt/sbt/ivy/, [organization]/[module]/[type]s/[artifact]-[revision].[ext]
- I assumed that
[organization]/[module]/[type]s/[artifact]-[revision].[ext]
represents the pattern in~/.ivy2/cache
. - For example, the artifact
https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.17/scala-library-2.12.17.jar
is stored in~/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.17.jar
.
However, SBT is unable to find any artifacts. I've referred to the following references, but couldn't find a suitable solution:
I would greatly appreciate any help or guidance to resolve this issue. Thank you!