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

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 >
           <e:rg="org.codehaus.groo:ule="groovy-a.
     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: http://repo.grails.org/grails/repo/>
              <e/rg="org.codehaus.groo/ule="groovy-a/rg="org.codehaus.groo-ule="groovy-a.pom
      > Illegal character in path at index 34: http://repo.springsource.org/repo/>
              <e/rg="org.codehaus.groo/ule="groovy-a/rg="org.codehaus.groo-ule="groovy-a.pom
      > Illegal character in path at index 30: http://repo1.maven.org/maven2/>
              <e/rg="org.codehaus.groo/ule="groovy-a/rg="org.codehaus.groo-ule="groovy-a.pom

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:

https://github.com/aaronzirbes/gradle-ivy-writer-bug

There seems to be something wrong with the

<code>

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

Sorry, not URLs but XML tag properties.

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

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

cheers, René

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).

I can confirm it also happens on Mac OS X 10.9.1

‘Me too’ with this configuration.

Hey,

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: http://issues.gradle.org/browse/GRADLE-2987

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

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

i’m seeing this also

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