A transitive dependency of our Gradle project requires compile group: 'org.apache.yetus', name: 'audience-annotations', version: '0.10.0'. It appears we may be hitting a bug in Gradle in that it quite possibly doesn't handle system-scoped and optional dependencies properly.
I had a look at your project's pom.xml files and there are actually issues with it as well.
Consider the following snippet:
What's the point in both having the jdk.tools dependencies define in a profile and then also in the main <dependencies/> section? If you move this dependency into the profile and remove the one from the main <dependencies/> section, and make the profile activated via a system property, or activate it through your settings.xml via the activeProfile section, this should be okay.
I agree that theoretically, this is bad Maven practice, because it breaks build portability, but on the other hand, you're already breaking build portability by declaring a system-scoped dependency.
Is it really necessary to depend on the tools.jar? If you're using a JDK to build the code, you should always have it on your classpath? What seems to be the issue that you're trying to solve, (which I appear to be missing)?
I haven't gone through all of your project's pom.xml files, but I suspect the same fix might be required elsewhere as well.
Many thanks in advance!