Ali Salehi
Ali Salehi

Reputation: 6999

SBT, dependencies, classpath and editors

I recently updated my sbt setup to version 0.11. As you may know, new SBT uses .ivy2 folder to store/cache all the retrieved jar files. I am using IntelliJ and I would like to know what is the recommended way of importing dependencies to the editor's classpath.

One option is to manually visit .ivy2 folder and select the dependencies. Is there a better/easier way to doing this?

Upvotes: 4

Views: 3547

Answers (2)

dirkb
dirkb

Reputation: 403

I presume you use the SBT-plugin. According to the instructions on the linked page:

After each change to your dependencies, run gen-idea in the SBT Console. When prompted, reload the project.

I usually run gen-idea no-classifiers no-sbt-classifiers (see under "Usage" on github). IntelliJ (11 RC) will then ask you to reload the project, which is usually quite fast. Then the references to your SBT dependencies will be available.

Upvotes: 6

CrazyCoder
CrazyCoder

Reputation: 402325

You can try IvyIDEA plug-in.

Upvotes: 0

Related Questions