mpeltonen / sbt-idea

A simple-build-tool (sbt) plugin/processor for creating IntelliJ IDEA project files
Other
1.07k stars 153 forks source link

add lib_managed/compile etc as library of project #45

Open imrichardcole opened 13 years ago

imrichardcole commented 13 years ago

when adding dependencies to my project in project/build/Foo.scala, the resolved dependencies are not added to the idea library and are therefore not found. Workaround is to just add the lib_managed/compile as a jar directory but would be good to have this automated

mpeltonen commented 13 years ago

Would you mind providing an example project that demonstrates the problem, because I don't quite understand from the above what you mean?

The 'normal' dependencies declared in project definition (as I undestand Foo.scala is) are definitely added to idea classpath when you run 'sbt idea'. This is actually the main point of the plugin? Do you mean something else?

imrichardcole commented 13 years ago

Apologies, I was unaware that after adding a dependency in my Foo.scala project file and running sbt update, I then had to run sbt idea again. Would it not be possible to add the lib_managed dir to it's own library so that you would only need to run sbt update and any new dependencies would be added to the classpath? May be a nice to have but it avoids having to have different workflows between using sbt on its own and with idea. Thanks for the quick repsonse

mpeltonen commented 13 years ago

This approach has been discussed before in some other issues:

https://github.com/mpeltonen/sbt-idea/issues/closed/#issue/7 https://github.com/mpeltonen/sbt-idea/issues/closed/#issue/35

Personally I'm not currently very interested in investing time to change the current behavior as it works for me just fine, but if someone else thinks this is worth implementing, by all means! :) Let's keep the issue open.