1

How can I publish a myproject-test.jar in one sbt project, containing my test classes, and depend on both that, and myproject.jar, in another sbt project?

Robin Green
  • 32,079
  • 16
  • 104
  • 187

1 Answers1

0

This answer is for sbt 0.11.3.

In the first sbt project:

publishArtifact in Test := true

In the second one, specify the dependency like this:

"com.example" % "myproject" % "42" classifier "test" classifier ""

(i.e. add the two classifiers to your existing dependency specification.)

However, you probably want to do this instead in the second project.

Community
  • 1
  • 1
Robin Green
  • 32,079
  • 16
  • 104
  • 187