It appears Groovyc doesn't handle javac compiler options that have space-delimited args such as -Xmaxerrs number in joint compilation mode. I discovered this in an Ant project using 2.4.7 but I see the same failure using the 3.0.7 groovyc CLI:
Looks like the parser handles all javac flags as single values and doesn't allow for flag=>pairs like maxerrs, maxwarns, or stdout (javac 8 docs). This results in the flag's value being treated as a source file and failing compilation.
Should these flags be handled? Let me know if you need more info, happy to help.