Possibly an IntelliJ question, is there a way to specify the root package name? I noticed if I have at least 1 class in the root and set the package to the name I want, then new files added there or sub directories automatically get the correct package name. Problem is if there are no classes in the root (only other sub-packages) then new files created in those don't get the correct package name and defaults to "package dirname" instead of "com.blah.modulename.dirname"