IntelliJ Idea generated source
You can go to Files > Project Structure
and then choose your module and on the sources tab you can navigate to the generated-sources
dir and click Mark as > Sources
:
Additionally, folder could be assigned to the specific type from the Project
panel via mark directory as
context menu.
To have maven do it automatically, look here: How to create folder for generated sources in Maven?