[2.1] What is the best solution to update the dependencies for a IntelliJ IDEA project?

2,063 views
Skip to first unread message

Christian Kaps

unread,
Feb 6, 2013, 5:47:19 AM2/6/13
to play-fr...@googlegroups.com
Hi,

what is the best solution to update the dependencies for a IntelliJ IDEA project? Because if I use the play idea command after updating some dependencies or switch to another play version, it generates over 100 module errors like:

Library 'SBT: commons-logging:commons-logging:1.1.1' is not used
Library 'SBT: commons-lang:commons-lang:2.6' is not used
...
Module 'my-module-build': invalid item 'scala-2.9.2' in the dependencies list

And removing over 100 errors all at once kills the IDE. So the procedure to remove the errors is as follows:
- remove some errors
- apply the settings
- restart the IDE
- start the same procedure again until the errors are gone

This is very annoying procedure.

Cheers,
Christian

Fabian Köhler

unread,
Feb 6, 2013, 10:44:31 AM2/6/13
to play-fr...@googlegroups.com
+1 would like know the answer :)

volker...@eligotech.com

unread,
Feb 6, 2013, 11:04:49 AM2/6/13
to play-fr...@googlegroups.com
Have you tried:

- Quit IntelliJ
- remove sbt/play generated idea-files (i.e. something like "rm -rf .idea*")
- recreate those files: "sbt idea" (or "play idea")
- restart IntelliJ

As far as I understand, if you do not delete old files and quit IntelliJ, things are merged instead of replaced.

Fabian Köhler

unread,
Feb 6, 2013, 12:19:34 PM2/6/13
to play-fr...@googlegroups.com
Well that's a workaround but you loose all your project settings etc. You can just delete the modules folder and it's fine. I still feel it is a little broken.

I actually thought it might be better to use play just via sbt and pull it in as a dep than you can use the normal sbt-idea plugin and also the sources should work better?

fielding

unread,
Feb 26, 2013, 8:50:55 PM2/26/13
to play-fr...@googlegroups.com
Just removing .idea* file doesn't work on windows at least. 
you have to do "Intellij File -> invalid caches"  also.

Christian Kaps

unread,
Feb 27, 2013, 3:03:44 AM2/27/13
to play-fr...@googlegroups.com
The best solution for me is:
- Close IntelliJ IDEA
- Remove the directory .idea_modules
- Remove all files in the directory .idea/libraries(Maybe it is possible to remove the complete directory)
- Execute command play idea

Then I have only 3 module errors which are related to the wrong Scala version for the created *-build project and the Scala facet. But this can be easily resolved by changing the version to 2.10.0. Scala version 2.9.2 can then be removed.

This works also under Windows and all settings are kept.

Cheers,
Christian

2013/2/27 fielding <fieldi...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages