IDEA library (jar) update problem

I'm testing idea as the development platform for our next product. however, there is one problem that i've encountered : i have two modules in a project. one of these modules contain a class A, and the other one contains class B which is inherited from A.

I generate a jar from first module, and it's defined as a global library. Second module which contains class B uses this global library.

The problem occurs when i update something in first module. This update is not seen by second module. Well, it's seen but only after i compile both projects for an undetermined number of times.
If i remove the reference to global library and add again, the changes are seen. This makes me think that idea uses some kind of cache to store contents of libraries.If this is true, how do i force refresh of this cache?
Or are there any settings for these kind of library management issues? like time interval for checking changes in file system etc...

This is really important for us, since there are almost 20 or more modules in the project and more than 10 developers are working on them, updating changes to output jars. If these changes are not reflected among modules, which pretty much depend on each other, than we can't efficiently use idea. Any help will be appreciated a lot

Best Regards
Seref Arikan


it would seem more appropriate to declare a dependency between the 2 modules than using jars and global libraries (unless the module containing class A is almost never updater)

In module B properties, look for the dependency tab and select module containing A.


hi, i've tried that from the beginning. in my case, i've realized this situation, when i've changed a method in A from private to protected so that i can override it in B.
despite all my efforts, idea kept claiming that the method was privat in B.
After sending the first message, i've changed compiler properties, (something like honor dependencies while compiling bla bla), and things seems to be fine. i've also changed the compiler properties so that in every compilation the directories are cleaned. this slows down things a little bit, but for now things appear to be fine. i'll repost if the problem persists.
thanks a lot for your interest.
PS: by the way, if i use dependencies instead of global libraries, does not it make it worse? in that case instead of using jars, idea would be using classes of related modules which would be open in the editor, which means(only guessing) a lot much more ram and cpu during development. I am wrong on this one?


Not really, because (contrary to eclipse), IDEA does not compile your classes until you ask it to (using make or build commands).
AFAIK the thing IDEA does (and it is very good/fast at it) is only parsing your files.
That's why i was advising using plain dependencies, as taking into account the changes you make in the parent module will not require a compile operation to be seen from the dependent modules


IDEA is pretty good at handling these sorts of things. I would
recommend using module dependencies too and not packaging
module A as a global library. I would be surprised if you saw
any ram/cpu usage difference.

Using dependencies will also let IDEA do the right thing when
you refactor things across modules (for example, changing
the access level of an inherited method).



Please sign in to leave a comment.