When I open an existing Maven project, the IDE shows only those files on the root directory, but not any directories in the project. After a while, the IDE will show the project as what it is in the file structure, but not the directory types such as source code, test when I reopen the project. I reinstall the community edition, but the problem still resists. I have experienced the same issue for a few Java projects lately.
How to resolve this issue?
CodePudding user response:
1, Please ask another teammate to check if that project really works. Sometimes the application structure already broken, then it is not your local problem.
2, There is a .idea folder in the application, delete it. Or simply, you git clone a new place Important: Please notice if you have edited / created some new files in the original directory, otherwise you would lost them if you delete the application.
3, Open intellij, and File -> Invalite caches
Personally, the second point is recommendated.
CodePudding user response:
Try to click on Reload All Maven Projects
in Maven tool window:
If it doesn't help you can try to perform the following actions:
- Close the project with
File | Close Project
. - Close the IDE.
- Open your project in OS file manager and remove all .iml files and the .idea directory.
- Reimport the project.
If the problem remains contact JetBrains support and attach a compressed log folder along with the project structure tree.