I am using using the jaxb2 xjc plugin for generating java files from a XSD. Therefore I used to configure my pom.xml as follows:
I'm not sure if this applies to your environment, but if the app is split into maven modules then the best solution fitting my needs I found so far is to remove all affected modules from eclipse IDE. Whenever I need to regenerate I simply build from command line with mvn install. Eclipse is then using packages from repo and not trying to build on its own, no runOnIncremental fiddle-around needed (which I was using for quite some time), no red modules/lines, builds faster too.