IntelliJ - Target subfolder keep getting deleted
已回答
Hello there
I keep having the same problem but can't find a proper solution (maybe i didn't search properly). I'm a beginner with the IDE.
Here my problem:
My target subfolders and files keep getting deleted when I build/rebuild my project.

The 3 folders in red are updated with users uploaded files, so they are not save in the resources folder in project. But sometimes on rebuild this folders are just cleaned and I wanted to know if there is a thing for preventing that.
请先登录再写评论。
Hello!
Thank you for reporting this!
Could you please elaborate on how the content of those folders is being generated?
I'm assuming you're initiating the build with IDEA's Build Menu?
Does the Project use Maven / Gradle or does it exclusively rely on IDEA's Native Build System?
This is a Spring Boot web application using Maven.
I use a Build and Run Configuration to launch my project.
( I should have write this from start ^^' sorry)
The thing is that it appens randomly. I've got this problem like 2 times in at least 10 days of dev. Some times the folders are deleted and some others the files ara just corupted and unreadable.
Lumikan 2035 Thank you for sharing the details!
Are you using a Spring Boot Run Configuration or Maven Run Configuration?
The random nature of it and how rarely it occurs makes me think that there might be a third-party factor in play.
However, if incremental compilation is used, it may also affect this.
I don't really know what to respond.
The first time I used the play button here :
And since I just using this:
In the Run Config only the Application is showing not Maven nor Spring:
Lumikan 2035 That's an Application Run Configuration.
Could you please share the logs (
Help → Collect Logs and Diagnostic Data) for further investigation along with the rough date / time when the issue was occurring?You can share the logs here or via our upload service, in the that case, please share the Upload ID.