After an upgrade from 3.0 to 3.2, our Ant build target started failing with the error attached. Clearly it is unhappy about our empty source directory; but in the past we didn't get this error. The directory does exist.
In our particular setup, one of our applications has multiple modules (this one has 30 modules), and each module is considered in Sonar to be a separate project. A few of the modules have empty Java source directories because they contain only non-Java files, but our build script is standard across the modules. This wasn't causing problems for us until this upgrade.
We have worked around the issue by using the "unless" argument on our Ant target that calls the sonar:sonar target, and then setting the linked property in a custom build file in only the modules without source files. In other words, Ant no longer invokes sonar for modules with a manually-set "sonar.notneeded" property. But this means it will have to be maintained in the future, or a better workaround could be made that looks to see if the folder is empty.
We would like Sonar to be fixed to the old behavior of ignoring empty source folders, or perhaps outputting a warning but not failing entirely.
Output from Ant is attached.