Apparent dependency resolving problem

Hello,

During resolving dependency of ‘org.apache.axis2:axis2-ant-plugin:1.6.1’ (and happens with others too) several fatal errors (see below) are shown by gradle (milestone-9). Despite that fresh downloads and the build is reported to be successful. There were no such things earlier. The closest thing I could find is: http://gradle.1045684.n5.nabble.com/Already-seen-doctype-error-trying-to-resolve-dependency-td4259072.html But this beast seems to be something different as downloads do happen.

Is this something to be afraid of, has anybody seen things like that?

Thanks! Zsolt

Download http://mvnrepository.com/artifact/commons-cli/commons-cli/1.2/commons-cli-1.2.pom [Fatal Error] commons-cli-1.2.pom:2:10: Already seen doctype. org.xml.sax.SAXParseException; systemId: http://mvnrepository.com/artifact/commons-cli/commons-cli/1.2/commons-cli-1.2.pom; lineNumber: 2; columnNumber: 10; Already seen doctype.

at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:253)

at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:288)

at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)

at org.apache.ivy.util.XMLHelper.parseToDom(XMLHelper.java:196)

at org.apache.ivy.plugins.parser.m2.PomReader.(PomReader.java:95)

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.GradlePomModuleDescriptorParser.parseDescriptor(GradlePomModuleDescriptorParser.java:103)

at org.gradle.api.internal.artifacts.repositories.cachemanager.AbstractRepositoryCacheManager.parseModuleDescriptor(AbstractRepositoryCacheManager.java:80)

at org.gradle.api.internal.artifacts.repositories.cachemanager.DownloadingRepositoryCacheManager.cacheModuleDescriptor(DownloadingRepositoryCacheManager.java:117)

at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:546)

at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:266)

Sounds like an invalid POM. Are you saying that the build succeeds despite this output?

Yes. I double checked starting with all the caches removed. The same fatal errors reported for the *.pom.sha1 files. A have not checked yet the working of jars because this was done only for a simple test project.

I can’t reproduce this. Can you try with the latest Gradle version? If the problem still occurs, can you post a build that allows to reproduce the problem?

The problem is that you are using http://mvnrepository.com as a maven repository. Gradle is trying to download http://mvnrepository.com/artifact/commons-cli/commons-cli/1.2/commons-cli-1.2.pom as a POM, but you can see that it’s a HTML page about the POM.

We really need to see your build, particularly the ‘repositories’ and ‘dependencies’ blocks.

Yes, that was it. My repositories contained ‘http://mvnrepository.com’. Having got rid of it messages ceased to appear.

Thank you! Zsolt