There appears to be a bug in Gradle 1.10 in regards to the new IvyXmlModuleDescriptorWriter

(Aaron Zirbes) #1

The new IvyXmlModuleDescriptorWriter seems to be escaping URLs when it shouldn’t while writing out Ivy XML descriptors.

For example, it writes out

<dependency org="javax.servlet" name="jstl" rev="1.1.2" force="true" conf="provided->compile(*),provided(*),runtime(*),master(*)"/>

rather than

<dependency org="javax.servlet" name="jstl" rev="1.1.2" force="true" conf="provided->compile(*),provided(*),runtime(*),master(*)"/>

It causes the following gradle failure:

:grails-clean FAILED
  FAILURE: Build failed with an exception.
  * What went wrong:
Execution failed for task ':grails-clean'.
> Could not resolve all dependencies for configuration ':test'.
   > Could not resolve >
     Required by:
         org.gradle.bugs.example:gradle-ivy-writer-bug:0.1 > org.grails:grails-dependencies:2.2.4
      > Illegal character in path at index 35:>
      > Illegal character in path at index 34:>
      > Illegal character in path at index 30:>

You can find all the affected ivy.xml files by grepping the following

grep -r --include '*.xml' -E "\-04db4a610dad6c671d6f3ebb65439d8cgt;" ~/.gradle/caches/modules-2/

The following sample project on GitHub easily reproduces the issue:

(Aaron Zirbes) #2

There seems to be something wrong with the


tag in this forum software. The actual grep statement above is included in the on the GitHub page if you want it.

(Aaron Zirbes) #3

Sorry, not URLs but XML tag properties.

(John Engelman) #4

This is a tricky one. We only found it because one of our team members had to delete their Gradle cache for another reason.

(René Groeschke) #5

Hello, I saw that issue before. Can you provide more details on which OS, jdk / jvm you’re using?

cheers, René

(John Engelman) #6

We are seeing this on Mac OS 10.8.3 with both Java 1.6.0_45 and Java 1.7.0_40 (and 1.7.0_45).

(Aaron Zirbes) #7

I can confirm it also happens on Mac OS X 10.9.1

(Danny Thomas) #8

‘Me too’ with this configuration.

(Szczepan Faber) #9


Not sure what’s the original problem because the xml snippets that you compare in this post look exactly the same to me. If you refer to escaping illegal characters in 1.10 then this is correct behavior and those chars should be escaped.

This problem might be related to the fact that 1.10 generates ivy xmls with xml v1.1. schema (e.g. the xml preamble has changed). I’ve verified that there are some issues parsing those ivy files by standard java tools based on xerces. Basically, the parsing is not reliable. Therefore in Gradle 1.11, we will change this back and generate ivy files (and junit xml results, too) back with xml schema 1.0. Please follow this ticket:

(Danny Thomas) #10

The first reply explains the problem w/ the examples looking the same - the linked readme has the correct details.

(Aaron Zirbes) #11

It appears that ‘’ doesn’t render raw xml as raw and changes things like &gt; to just > The link to the README renders the example XML differences correctly.

(excentric) #12

i’m seeing this also

(René Groeschke) #13

gradle 1.11 was released today which contains a fix for this issue. cheers, René