I noticed this while working on a replacement for GMaven. I think JavaStubCompilationUnit should allow other extensions such as ".gvy", ".gy", ".gsh" to be used when adding sources. This change in behavior was introduced with https://fisheye.codehaus.org/changelog/groovy?cs=18020. I think what we might want to do instead is blacklist ".java" rather than whitelist ".groovy". I've attached a patch demonstrating this.