I'm trying to package a few in-house artifacts for use with SBT. I would just use the libs
directory in most cases, but there are multiple projects that share the same artifacts.
I've been trying to use the directory structure that is produced by SBT as a basis for this small repository. It stores the artifacts in .ivy2
like so:
.ivy2/cache/[org-with-dots]/[module]/[artifact]-[version].[ext]
I've copied the stuff i need under cache
to it's own folder and then tried the following patterns in SBT to no avail:
resolvers += "cache" at "file:/../ivy-cache"
resolvers += Resolver.file("cache", file("../ivy-cache"))
resolvers += Resolver.file("cache", file("../ivy-cache"))(Resolver.ivyStylePatterns)
resolvers += Resolver.file("cache", file("../ivy-cache"))(Patterns("[organization]/[module]/[artifact]-[revision].[ext]"))
None of these work. The closest was the last one, but organization comes out with slashes instead of dots. The Resolver.ivyStylePatterns
used dots in the organization, but expected a folder called ivys
to be used.
So I have a two part question:
- Should I just be doing something else to capture these locally hosted artifacts? Im not building them, so
publish
is not desirable. - Is there a way to specify the pattern I want above without doing a string replacement from
/
to.
in the organization component?