How does IDEA determine if src/main/groovy is a source folder?

Created a new IDEA project for a maintenance branch of our Maven-based project. However, src/main/groovy is not recognized as a source folder. (G)Maven build works fine. What could go wrong here? IU-94.192

Cheers,
Peter

2
5 comments
Avatar
Permanently deleted user

Yeah unfortunately (afaik) idea maven import does not look whether gmaven plugin is active and includes groovy source folders  automatically.
I always go 'Project Settings->Modules' and add the respective folder as source folder. Go right and mark the folder as 'Test Sources' (green) or Source (blue) folder.

0
Avatar
Permanently deleted user

Usually IDEA does recognize src/main/groovy automatically, but not this time. As I have no clue why, I'd like to know how source folder detection works under the hood. Adding source folders manually is hardly an option for me. We have 60+ modules, and I have to re-import about once a day.

1
Avatar
Permanently deleted user

Sorry, I didn't notice that this ever worked.... Maybe it is a regression bug (worked in idea 8 but not on idea 9)? I just know that they changed the handlings of groovy integration (it is now tighter integrated to java environment instead of an own facet).

Maybe you find or file a bug ticket under http://youtrack.jetbrains.net/issues/IDEA?q=groovy+source+folder

0
Avatar
Permanently deleted user

It works for our dev branch, but not for our latest release branch. So it's not a matter of IDEA 8 vs. 9.

0

I'm not sure about Maven, but creating a project over existing sources
currently doesn't autodetect source roots if they don't contain Java
classes. http://youtrack.jetbrains.net/issue/IDEA-47462

0

Please sign in to leave a comment.