Publishing sub-projects using SBT

I have a Scala Project which is divided into 2 independent sub-projects (A and B). Both depend on another project C. C is a module which has all the common code for A and B. It doesn’t have use indepdently.
I have set up my build.sbt file to release A and B. After I release, I can see the libraries coming up in maven central as well.

The problem is when I use one of the libraries, say A, in a new project as a dependency, sbt complains that the project C could not be found. I do not want to publish C as an individual entity. Can it C be embedded into A and B?

What if I want to have both A and B on the classpath? That’s why it isn’t normally done that way (including common classes in both JARs). So I hope are you considering whether you realllllllly need to do this, or whether it might be okay to just do things the usual way, even if the separate JARs rubs you the wrong way a little.

If you’re really certain you want both A and B to be “fat” JARs, then the standard approach is to use the sbt-assembly plugin, which is highly configurable.