2

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
LK__
  • 6,515
  • 5
  • 34
  • 53
  • publishing manually once isn't enoug? If it's a third party how often are you predicting it'll change? – pedromss Sep 04 '17 at 18:27
  • Possible duplicate of [How to publish jar to local repository?](https://stackoverflow.com/questions/7798767/how-to-publish-jar-to-local-repository) – Igor Antonov Sep 05 '17 at 10:39

1 Answers1

2

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.

laughedelic
  • 6,230
  • 1
  • 32
  • 41