So I have a maven multi-module project in the structure:
- my-project-parent
-
my-project-component1
-
my-project-component2
-
…
-
my-project-componentX
-
When I run mvn clean install -Pmyprofile1,myprofile2
inside my-project-parent
maven says:
[INFO] --- clean:3.2.0:clean (default-clean) @ norcap-parent ---
[INFO] Deleting C:..my-project-parenttarget
.. however what it does instead is that it moves everything from the target
directories of each my-project-componentX
+ what was previously in the .clean
directory inside my-project-parenttarget.clean
As consequence, the my-project-parenttarget.clean
grows exponentially (46 GB at the time of writing)
Does anyone know why I get this behavior and how can I prevent it?
NB: I can share relevant parts of the POM if needed, just don’t know which ones would they are atm
Maven version: 3.9.3
Java version:
openjdk 11.0.21 2023-10-17 LTS
OpenJDK Runtime Environment Corretto-11.0.21.9.1 (build 11.0.21+9-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.21.9.1 (build 11.0.21+9-LTS, mixed mode)
Expected result:
target
directory in parent project to be cleaned
Actual result:
target
directory has cached contents of old target directories
1