sbt allows manually copying in jars to lib/
- it will find and use these unmanaged dependencies. IntelliJ, though, can't seem to find anything I put it that dir. How can I tell it to use them?
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>/.
After you have an sbt build – one you created yourself or from a template – follow these steps to import the project into IntelliJ IDEA: From the Welcome Screen or File menu, select Open. Browse to and select the top-level folder of your sbt project, and click OK. The Import Project from SBT dialog opens.
IntelliJ plugin can be found here http://confluence.jetbrains.com/display/SCA/Scala+Plugin+for+IntelliJ+IDEA or can be installed directoly from within the IDE using Settings -> Plugins dialog. Afterwards one can just do File -> New Project -> Scala -> SBT based.
You have to add these manually:
After adding the jars to the lib directory , add this line in build.sbt
exportJars := true
Create a lib directory directly under your project directory and place your jar (or symbolic link to jar) there. Note, if you're executing sbt from command prompt, you'll need to be in the project directory for this to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With