I've created a new Maven project of type Web application (WAR), called "maven-war-sample". I've used the "org.codehaus.mojo.archetypes:webapp-javaee7" archetype.
I want that, as soon as I edit and save a resource, the IDE automatically copies/filters it to the "target/maven-war-sample-1.0-SNAPSHOT" directory. By resource I'm referring to any file in the "webapp" directory.
To do so, I've enabled the option "Settings → Build, Execution, Deployment → Compiler → Build project automatically". This compiles the classes to the "target" directory, but it doesn't copy the resources.
Later, I've enabled the option "Project Settings → Artifacts → maven-war-sample:war exploded → Include in project build". If I build the project manually, then the resources are effectively copied to the desired directory. However, the auto-build feature seems to ignore them.
It's really weird, because I have at least one Java EE project in which this feature worked as expected, without enabling any of the mentioned options (at least explicitly). But yesterday, I removed the ".idea" directory from that project, to try to detect why it worked there but not in other projects. And, suddenly, it stopped working, even restoring the original directory back. I've even deleted the "~/.config/JetBrains" and ".cache/JetBrains" directories, to start from scratch. Same result.
Can you help me, please? I'm using IntelliJ IDEA 2022.1 (221.5080.210), in Debian 11, with OpenJDK 17.0.2.