Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SBT not adding unmanaged JARs

Hey I am trying to sbt compile a Scala project with 2 external .jar libraries as dependencies. I've added them in the /lib folder and I can see they are recognized by sbt when I run "show unmanagedClasspath" I see the 2 jars. However when I run "sbt assembly", sbt tries to resolve dependencies and fails when it can't download the libraries that are already there.

like image 954
Todor Markov Avatar asked Feb 24 '26 06:02

Todor Markov


1 Answers

You don't need to add the jars that you've in the \lib directory again in libraryDependencies. libraryDependencies is part of your managedClasspath and everything in lib directory is part of your unmanagedClasspath, both together forms your dependencyClasspath.

You can see this by typing this on sbt prompt and checking the dependencies section:

inspect externalDependencyClasspath

In this case 'external' just means dependencies that are external to the project (ie not internal project dependencies)

like image 118
Ajay Padala Avatar answered Feb 25 '26 20:02

Ajay Padala



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!