I have a Maven plugin which generates sources for my java project and places them into 'target/generated-sources' folder. I need these sources at compile-time. I want to have them in my project while modifying it, already generated. And of course, I want to put them into the correct folder under 'src' folder, and not into 'target/generated-sources'. How can I organize this using Maven?
In other words, I want to be able:
generate sources I need by running some goal of my special source-generating plugin (already done, the sources have the package I specified)
move these generated sources to 'src/main/java/...' folder of standart Maven layout.
remove them from 'target/generated-sources' folder, because otherwise mvn clean install command raises error which says that I have "duplicate class". Indeed, if I just copy generated sources from target to src - I have to classes with the same name and package, though one of them is located in target folder.
Which Maven plugins can hlp with this? I suppose this is a typical task.