Just new to IntelliJ Idea. I have maven project which has few generated source java files.
When I import that project Idea complaints about generated source files are missing but I can see those files under target/generated-sources
. How can I add those files in the classpath.
The “maven-source” plugin is used to pack your source code and deploy along with your project. This is extremely useful, for developers who use your deployed project and also want to attach your source code for debugging.
zip to IntelliJ IDEA. 2.2 Platform Settings -> SDKs -> Select Sourcepath -> plus icon -> select src. zip from the JDK installed path. 2.3 Done.
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?
If you are using Springboot Application.
just follow the step in IntelliJ.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With