-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Description
Is your feature request related to a problem? Please describe.
When importing Nacos project into IDEA, the generated source files under target/generated-sources directory are not automatically recognized by IDEA, causing red squiggles in the IDE. This affects development experience as developers need to manually configure these directories as source roots.
Describe the solution you'd like
Add build-helper-maven-plugin in the root pom.xml to help IDEA automatically recognize the generated source files. The plugin will add target/generated-sources directory to the source roots during project import, which is a Maven standard practice for handling generated sources.
Describe alternatives you've considered
- Manually configure source roots in IDEA project settings
- Use IDEA's "Mark Directory as Sources Root" feature
- Configure through .idea project files
However, these alternatives:
- Require manual intervention for each developer
- Need to be reconfigured after project reimport
- Are IDE-specific and not portable
Additional context
This is a common practice in Maven projects that use code generation (like Protocol Buffers). The build-helper-maven-plugin is widely adopted for this purpose and is considered the standard solution. It works across different IDEs that support Maven integration.
The plugin configuration will be added to the root pom.xml to ensure consistent behavior across all development environments.