My Java project is build with Maven and written with the help of Intellij Idea. I have a lot of open-source project dependencies and I want to study them extensively to understand how they work. For this I often use a usage search in Idea, i.e. Find Usages option, which tells me where the usages of some class can be found. Also it can be Find In Path option, or some other code navigation tool.
The problem is that I am not sure all the sources are downloaded. Thats why my search may give wrong results.
A question is : how can I force Idea and Maven download all the sources for my project and make all my searches complete ?
We can use -U/--update-snapshots flag when building a maven project to force maven to download dependencies from the remote repository. Here, -U,--update-snapshots : Forces a check for missing releases and updated snapshots on remote repositories.
If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.
In the 'Maven Projects' tab on the side of the Idea window is a toolbar button (looks like a box with a green arrow pointing down) for downloading sources and documentation.
In IntelliJ 2018.2.3 Ultimate Edition, click on "Maven Projects" on the right hand side of the window (vertical text alignment). Then click the third button on the left in the toolbar (arrow pointing down to a horizontal line- not green for me).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With