gradle/gradle — pull request #336 by netmikey (2014-09-22 09:44:22+00:00)
Title: Support external DTDs in descriptor when using Java8.

In Gradle 2.1's ear plugin, it is impossible to use an existing descriptor that references an external DTD when Java8 is used to run gradle. JAXP as of 1.5 / Java as of Java8 won't allow referencing external DTDs e.g. using http URLs by default. However, those exact URLs might be required by some application servers at ear deploy time. In order to be Gradle1.x / Java7 backward compatible, the property has been set on the XML parser with a backward-compatible error handling in case the parser doesn't know about it (which is the case for Java7 and below).

Unfortunately, no tests could be written for this change, because gradle tests should run completely offline (which misses the very purpose of this change) and because behavior depends on the used Java runtime. I have tested it on one of our old Gradle projects, which worked on Gradle 1.x, using a local built-from-source gradle installation and it works on all JDK versions I had at hand (6, 7 and 8).