Arne Claassen
Arne Claassen

Reputation: 14414

Manually providing missing maven/ivy dependency with sbt

I have a maven dependency in my sbt project that had one of its dependencies apparently unpublished (I have filed an issue for that problem already).

I still have a copy of that dependency and I'm trying to figure out how to get sbt to pick it up from a project specific location, rather than the local ivy cache, since this project needs to build on machines that don't have a pre-populated ivy store.

I've tried placing it into the project's lib directly but that does not seem to get considered as part of the dependency resolution of sub-dependencies.

EDIT: I rephrased this question to be about sbt dependency management rather than the specific library I am having problems with

Regarding Duplication: This is not a question about publishing un-managed jars to a local maven repository. It is about how to satisfy a dependency of a managed dependency via an unmanaged jar.

Upvotes: 0

Views: 671

Answers (1)

johanandren
johanandren

Reputation: 11479

Saw in the referenced issue that your problem might have been solved already, but in case it would be useful anyway:

Files added to lib/ is added to the classpath but there is no clever logic that will parse pom-files/ivy-descriptors and it will not be added to ivy's dependency resolution.

What you may be able to do though could make a local ivy cache for just this dependency inside of the project directory where you publish it according to ivy cache structure and then add that with a sbt resolver, something like this:

// with repo in projdir/local-netty-repo/
resolvers += Resolver.file("some-name", file("local-netty-repo"))

Upvotes: 1

Related Questions