eclipsemavenmaven-clean-plugin

How to stop Eclipse from recreating files deleted by Maven?


I have a bunch of files which are created during Maven's process-resources phase and cleaned during install phase. This clean-up is performed without trouble when I'm not working in Eclipse. e.g: when I execute mvn clean install on git bash.

The problem starts when I do that while my project is open in Eclipse. Even though Maven cleans the files successfully, Eclipse recreates them back into the project. How can I fix this?


Solution

  • When you do ANYTHING outside Eclipse via the command line you need to then refresh, clean the project else it does NOT know what changed.

    You might also try selecting your packages that use maven in the project navigator, right clicking and using Maven Update.