LK__
LK__

Reputation: 6723

Publish single 3rd party jar to local repository in sbt

I have a project which depends on a 3rd party jar SomeJar.jar.

How can I make a specific sub project cause this jar to be published to local repository before the sub project runs its own compile?

In the example below, somejar-common needs to first be published to local repo.

lazy val subproj1 = (project in file("subproj1"))
    .settings(libraryDependencies += "org.someorg" % "somejar-common" % "1.0.0") // This one needs to be deployed first to local repo

Upvotes: 2

Views: 491

Answers (1)

laughedelic
laughedelic

Reputation: 6460

If your (sub)project depends on a fixed jar, you don't need to publish it locally to work with it. You can add it as an unmanaged dependency: just put it in your (sub)project's lib/ subfolder.

See sbt documentation on unmanaged dependencies.

Upvotes: 2

Related Questions