apache / apache/grails-intellij-plugin
IDEA 14 always maps the grails-app/resources directory to java-resource in a Grails project
- Dominant language
- Java
- Stars
- 17
- Forks
- 4
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
If a Grails project is using the jaxrs plugin all of the rest resource classes are required to be created in a directory under the main grails-app directory called resources. For some reason in the resource directory is always mapped as a type of "java-resource" in the iml. I have tried several different ways of trying to mark the directory as "src" and not "java-resource", but it always gets changed back to a resource directory. This causes issues with the right click context menu which does not show new package or source commands. All of the source in the directory is also treated as groovy scripts instead of groovy source. IDEA 13 had the same behavior.
Steps to reproduce:
1. Create a new Grails app project
2. Add a grails-app/resources directory
3. The resources directory will automatically be marked as java-resources, no change to the directory type will ever allow that to be changed
Example lines from the project iml:
<sourceFolder url="[file://$MODULE_DIR$/grails-app/resources](file://$MODULE_DIR$/grails-app/resources)" isTestSource="false" />
<sourceFolder url="[file://$MODULE_DIR$/grails-app/resources](file://$MODULE_DIR$/grails-app/resources)" type="java-resource" />
---
*Imported from [IDEA-137176](https://youtrack.jetbrains.com/issue/IDEA-137176) · Type: Bug · Votes: 0*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the mapping in a Grails project by creating grails-app/resources, then inspect the generated .iml entries for that directory. Confirm the directory is treated as a source root rather than java-resource, and verify that package/source actions and Groovy source handling work correctly afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100