How can I force Idea to download all sources of all Maven artifacts?

Answered

Sometimes we have to run FindInPath search to find something in our codebase. Often this can be a text of exception thrown by some external library which we want to investigate. We may run FindInPath search to lookup exception message and thus find out why it is thrown.

The problem is that source code of Idea artifacts is downloaded on demand. I.e. first it tries to decompile some Java class code, and then - if I press download sources - it tries to download them.

In case I have not downloaded sources FindInPath search doesn't work.

Can I force Idea to always download all available sources for my project?

7 comments

Hi Serge,

 

Do you know where intellij idea to store these source code and documents download from maven repository?

0

In your local .m2 directory, the same path where Maven would store it if you get it via the command line.

0

Thanks Serge.

In my project I use Idea to download the third library's source code and set breakpoint on the source code. I works fine and hit by the debbuger.

But I try to modify the source code and try to print out some information, it shows File is readonly.

Is there anyway to modify the source code to help debug? Thanks.

0

Configure the sources as a module and use the snapshot project dependency.

0

Sorry for disturb again. I don't quite get the point. Do you have any url I can refer to ? Thanks.

0

You can contact support to get more details: https://intellij-support.jetbrains.com/hc/requests/new .

Using someone's thread for random questions is not the best idea.

0

Please sign in to leave a comment.