-1

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?

Razorblade
  • 85
  • 1
  • 2
  • 9
  • to convince eclipse and maven to get along can be a bit cumbersome :/ one approach could be to disable auto building in eclipse and rely on maven only (which more ore less kills hot code replacement). The m2e plugin can be configured with some life-cycle mappings to if there is an eclipse event it will essentially execute a maven plugin. But that needs some tweaking too. What worked best for me is to do a maven build and then let eclipse build, then do another mvn install and leave it this way. That may work for days. E.g. avoid the clean goal. It is often more of a "workaround" – wemu Feb 05 '15 at 13:45

1 Answers1

1

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.

Cliff Ribaudo
  • 8,932
  • 2
  • 55
  • 78