Hi,
During configuration of new project we’ve come across a strange issue. The error message is as follows:
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve " conf="compile->compile(*),:);runtime->runtime(:
<dependen.
Required by:
:app-hooks:0.1-SNAPSHOT > com.domain.depr:app:4.617
> java.lang.IllegalArgumentException (no error message)
We dig for root cause and it seems that gradle 1.10 is not able to handle the ivy.xml file properly. The fishy part is that this ivy.xml is generated by gradle itself during the first build, which is successful. Any next build going to fail with the error message pasted above, unless this specific ivy.xml file is deleted from gradle cache.
This problem does not occur with gradle 1.9, so we compared ivy.xml generated by each version. The difference which causes the error is first tag, to be more specific xml version="" value. 1.0 works fine 1.1 fails
Just by editing this value we are able to either make builds working or failing on both gradle versions under tests (1.9 and 1.10).
We can’t provide example project as it’s proprietary code, however please find below both versions of ivy.xml (with altered some packages and artefacts names for the sake of confidentiality):
Gradle’s 1.9 correct ivy.xml
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="com.domain.depr"
module="app"
revision="4.617"
status="release"
publication="19700101005959"
>
<description homepage="" />
</info>
<configurations>
<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
<conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
<conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
<conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
<conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
<conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
<conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
<conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
<conf name="optional" visibility="public" description="contains all optional dependencies"/>
</configurations>
<publications>
<artifact name="app" type="jar" ext="jar" conf="master"/>
</publications>
<dependencies>
<dependency org="com.domain.depr" name="mdf-security-client" rev="0.0.13" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.hamcrest" name="hamcrest-core" rev="1.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.hamcrest" name="hamcrest-library" rev="1.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.hibernate" name="hibernate-core" rev="3.6.10.Final" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="javassist" name="javassist" rev="3.12.1.GA" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.jayway.awaitility" name="awaitility" rev="1.3.4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.jayway.jsonpath" name="json-path" rev="0.8.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="tibco" name="tibadmin" rev="4.2.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="tibco" name="tibjms" rev="4.2.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="mq" name="com.ibm.mqjms" rev="5.306" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="mq" name="com.ibm.mq" rev="5.306" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="mq" name="connector" rev="5.306" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="javax.jms" name="jms" rev="1.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.freemarker" name="freemarker" rev="2.3.18" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.ximpleware" name="vtd-xml" rev="2.10" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.apache.poi" name="poi" rev="3.9" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.9" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="commons-dbcp" name="commons-dbcp" rev="1.4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
<exclude org="xml-apis" module="xml-apis" name="*" type="*" ext="*" conf="" matcher="exact"/>
<exclude org="xerces" module="xercesImpl" name="*" type="*" ext="*" conf="" matcher="exact"/>
<exclude org="commons-collection" module="commons-collection" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="com.oracle" name="ojdbc6" rev="11.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.oracle" name="aqapi" rev="11.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-jms" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-test" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-jdbc" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-beans" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-core" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-context" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-webmvc" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-web" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-oxm" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.security" name="spring-security-core" rev="3.1.3.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.security" name="spring-security-web" rev="3.1.3.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.security" name="spring-security-config" rev="3.1.3.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.batch" name="spring-batch-core" rev="2.1.8.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.batch" name="spring-batch-infrastructure" rev="2.1.8.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.integration" name="spring-integration-file" rev="2.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.integration" name="spring-integration-jmx" rev="2.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.integration" name="spring-integration-jms" rev="2.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.integration" name="spring-integration-xml" rev="2.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.integration" name="spring-integration-core" rev="2.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.integration" name="spring-integration-xquery" rev="1.1.4-domain" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
<exclude org="net.sf.saxon" module="Saxon-HE" name="*" type="*" ext="*" conf="" matcher="exact"/>
<exclude org="com.saxonica" module="saxonee" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="org.jdom" name="jdom" rev="1.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.jdom" name="jdom2" rev="2.0.5" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.codehaus.jackson" name="jackson-mapper-asl" rev="1.9.6" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.thoughtworks.xstream" name="xstream" rev="1.4.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="net.ricecode" name="string-similarity" rev="1.0.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.antlr" name="stringtemplate" rev="4.0.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="commons-io" name="commons-io" rev="2.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.apache.commons" name="commons-lang3" rev="3.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="commons-collections" name="commons-collections" rev="3.2.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.apache.commons" name="commons-digester3" rev="3.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
<artifact name="commons-digester3" type="jar" ext="jar" conf="" m:classifier="with-deps"/>
</dependency>
<dependency org="com.googlecode.lambdaj" name="lambdaj" rev="2.3.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
<exclude org="org.hamcrest" module="hamcrest-all" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="com.google.guava" name="guava" rev="14.0.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.google.code.findbugs" name="annotations" rev="2.0.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.jasypt" name="jasypt-spring3" rev="1.9.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="joda-time" name="joda-time" rev="2.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.edp" name="datingserver" rev="3.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.monitoring" name="micromuse" rev="15.2.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
<artifact name="micromuse" type="jar" ext="jar" conf="" m:classifier="jdk1.5"/>
</dependency>
<dependency org="com.domain" name="jtiming" rev="0.0.7" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.json" name="json" rev="20090211" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="net.sf.supercsv" name="super-csv" rev="2.1.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="junit" name="junit" rev="4.10" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.springframework.integration" name="spring-integration-test" rev="2.2.6.RELEASE" force="true" conf="test->runtime(*),master(*)">
<exclude org="junit" module="junit-dep" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="org.jbehave" name="jbehave-spring" rev="3.8" force="true" conf="test->runtime(*),master(*)">
<exclude org="junit" module="junit-dep" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="org.mockito" name="mockito-all" rev="1.9.0" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="com.googlecode.catch-exception" name="catch-exception" rev="1.0.4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.kubek2k" name="springockito" rev="1.0.4" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.kubek2k" name="springockito-annotations" rev="1.0.8" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="xmlunit" name="xmlunit" rev="1.3" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="com.github.stefanbirkner" name="system-rules" rev="1.4.0" force="true" conf="test->runtime(*),master(*)">
<exclude org="junit" module="junit-dep" name="*" type="*" ext="*" conf="" matcher="exact"/>
<exclude org="commons-io" module="commons-io" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="org.xmlmatchers" name="xml-matchers" rev="0.10" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.reflections" name="reflections" rev="0.9.5" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.springframework.batch" name="spring-batch-test" rev="2.1.8.RELEASE" force="true" conf="test->runtime(*),master(*)">
<exclude org="org.springframework" module="spring-jdbc" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="org.spockframework" name="spock-core" rev="0.7-groovy-2.0" force="true" conf="test->runtime(*),master(*)">
<exclude org="org.codehaus.groovy" module="groovy-all" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="org.spockframework" name="spock-spring" rev="0.7-groovy-2.0" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.codehaus.groovy" name="groovy-all" rev="2.1.7" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="jline" name="jline" rev="1.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.fusesource.jansi" name="jansi" rev="1.6" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.typesafe.akka" name="akka-actor_2.10" rev="2.2.0-RC1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.typesafe.akka" name="akka-testkit_2.10" rev="2.2.0-RC1" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="org.apache.httpcomponents" name="httpclient" rev="4.2.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-aspects" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-aop" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework" name="spring-instrument" rev="3.2.6.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="cglib" name="cglib" rev="2.2.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.aspectj" name="aspectjweaver" rev="1.7.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.cloud" name="arm" rev="4.9.4.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.cloud" name="domain-object-adapter" rev="4.9.4.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.cloud" name="spring-client-support" rev="4.9.4.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.cloud" name="client-libs" rev="4.9.4.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.cloud" name="client-libs-extension" rev="4.9.4.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.cloud" name="engine" rev="4.9.4.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.cloud" name="client-libs-support" rev="4.9.4.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.saxonica" name="saxonee" rev="9.5.1.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.googlecode.flyway" name="flyway-core" rev="2.1.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.gemstone.gemfire" name="gemfire" rev="6.6.4.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.springframework.data" name="spring-data-gemfire" rev="1.3.0.RELEASE" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
<exclude org="com.gemstone.gemfire" module="gemfire" name="*" type="*" ext="*" conf="" matcher="exact"/>
<exclude org="xml-apis" module="xml-apis" name="*" type="*" ext="*" conf="" matcher="exact"/>
</dependency>
<dependency org="args4j" name="args4j" rev="2.0.16" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.eclipse.jetty" name="jetty-server" rev="8.1.3.v20120416" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.eclipse.jetty" name="jetty-webapp" rev="8.1.3.v20120416" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.proj" name="proj-security" rev="1.7" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="javax.mail" name="mail" rev="1.4.7" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="javax.activation" name="activation" rev="1.1.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="commons-httpclient" name="commons-httpclient" rev="3.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.sso" name="DSWSJMXLm" rev="1.0.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="org.apache.commons" name="commons-math3" rev="3.1" force="true" conf="test->runtime(*),master(*)"/>
<dependency org="net.sourceforge.findbugs" name="annotations" rev="1.3.2" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
<dependency org="com.domain.depr" name="app-rest-client" rev="1.0.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
</dependencies>
</ivy-module>
Gradle’s 1.10 failing ivy.xml <?xml version="1.1" encoding="UTF-8"?>
<artifact name=“micromuse” type=“jar” ext=“jar” conf="" m:clas