I have pretty straightforward Maven project I imported into Idea. Project structure is:
Project Root│├───src│ └───main│ ├───java│ └───resources│└───webcontent ├───css ├───images └───js
I have Maven copy and filter any .js files I have in src/main/resource into webcontent/js with this resources element:
I got a big surprise when I executed Project|Rebuild Project off the menu and found that Idea had deleted the contents of the webcontent/js directory before copying/filtering the .js files from src/main/resources (there are many other .js files in webcontent/js that are not put there by resource filtering).
I can understand why Idea thought it needed to do this (though this is not how Maven behaves outside of IJ). My question is how did it figure out the webcontent/js folder was in effect a 'generated-sources' directory? Also, what is really happening when I do a Build|Rebuild Project. I would assume it is the exact equivalent of 'mvn clean' followed by 'mvn compile' but this is not true because Maven would not delete the contents of the directory. Just wondering where Idea leaves off and Maven begins in the whole build process...?
Any insight is appreciated.