You can use the maven property to create the java source file in the generate-src directory and attach it via the build helper maven plugin to the list of source folders.
You will manage the contents of the java file.
One way to create the original java file is to use the groovy maven plugin with an attachment.
hgrey source
share