3

My project has a dependency on a library that is available on GitHub, but with no binaries available. How can I tell sbt that I depend on it, so that it pulls the code and compiles it, but keeps it separate from mine? If need be, I can pull it manually - my main goal is a) to keep it clean and b) to transitively depend on all its maven dependencies.

UPDATE: The project that I'm depending on is built with Maven.

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
SRobertJames
  • 8,210
  • 14
  • 60
  • 107

1 Answers1

3

My understanding is that there's no easy way to do what you're after - to have sbt download the project (possible - see below), mvn it (doable with some development) and depend on it (feature available out of the box).

If it were a sbt build, it'd be possible with ease. You can check the following questions to build a solution for you:

BTW, thinking aloud - you could also build a ModuleId you depend on that would execute git fetch, execute mvn and offer the result as a ModuleId/ProjectRef. It could be possible.

If need be, I can pull it manually - my main goal is a) to keep it clean and b) to transitively depend on all its maven dependencies.

What about mvn install to the local Maven repo and add Resolver.mavenLocal to resolvers in the dependent projects? It should make it fine.

Community
  • 1
  • 1
Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420