IntelliJ Idea Generated Source

Just new to IntelliJ Idea. I have a Maven project that has several generated Java source files. When I import this Idea project, there are no complaints about the generated source files, but I can see these files in target/generated-sources . How can I add these files to the classpath.

+6
source share
1 answer

You can go to " Files > Project Structure then select your module and on the" Sources "tab go to the generated-sources directory and click" Mark as > Sources :

Mark as sources - IDEA

In addition, a folder can be assigned to a specific type from the Project panel via mark directory as context menu.

For maven to do this automatically, look here: How to create a folder for generated sources in Maven?

+13
source

Source: https://habr.com/ru/post/984289/


All Articles