schmmd
schmmd

Reputation: 19448

Supply provided dependencies with build flag in sbt

I have a project that's main purpose is to provide a collection of algorithms to client. However, it secondarily handles a HTTP interfaces to those algorithms. Since I don't want my clients to inherent the HTTP libraries (unfiltered and dispatch) I have them scoped as provided in sbt. How can I set up my project so that when I sbt assembly, these dependencies (along with a logging implementation) are compiled but when I sbt package or sbt publish they are not?

Upvotes: 1

Views: 253

Answers (1)

jsuereth
jsuereth

Reputation: 5624

I think the answer is as simple as telling the assembly plugin to use the compile configuration of jars instead of the runtime dependency (since provided are not on the runtime classpath).

sbt 0.13 syntax:

fullClasspath in assembly := (fullClasspath in Compile).value

Upvotes: 2

Related Questions