Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does the lib directory for unmanaged jars in sbt directory structure go?

I'm trying to add jar files to an sbt project, but I can't figure out where to store them. The sbt docs say "Just drop them in the lib folder, and you're good!", but don't give any information about where to actually put this lib folder. Does the lib folder go under src? at the top level hierarchy where the src folder is located? I'm really not sure, and would appreciate some help.

like image 532
redeagle47 Avatar asked Feb 20 '15 21:02

redeagle47


People also ask

Where are SBT jars stored?

All new SBT versions (after 0.7. x ) by default put the downloaded JARS into the . ivy2 directory in your home directory. If you are using Linux, this is usually /home/<username>/.

Where are SBT dependencies?

Solution. You can use both managed and unmanaged dependencies in your SBT projects. If you have JAR files (unmanaged dependencies) that you want to use in your project, simply copy them to the lib folder in the root directory of your SBT project, and SBT will find them automatically.


1 Answers

According to http://alvinalexander.com/scala/how-to-create-sbt-project-directory-structure-scala , lib should be a subdirectory of your project directory. I just tried it, it works.

    .
    |-- build.sbt
    |-- lib
    |-- project
    |-- src
    |   |-- main
    |   |   |-- java
    |   |   |-- resources
    |   |   |-- scala
    |   |-- test
    |       |-- java
    |       |-- resources
    |       |-- scala
    |-- target
like image 75
foghorn Avatar answered Sep 28 '22 12:09

foghorn