Gradle could not resolve dependency with multiple versions declared in pom.xml


(Martynas Jurkus) #1

Compilation fails if there is a dependency that has multiple version declared. For example http://repo1.maven.org/maven2/org/odlabs/wiquery/wiquery-parent/1.5.7/wiquery-parent-1.5.7.pom

See

<jackson.version>[1.8,1.8.6],[1.9,1.9.7]</jackson.version>

If project depends from any child project i.e. wiquery-core dependency resolution fails:

FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve all dependencies for configuration ':ui-components:compile'.
> Could not resolve org.codehaus.jackson:jackson-mapper-asl:[1.8,1.8.6],[1.9,1.9.7].
  Required by:
      com.app:ui-components:1.5.8 > org.odlabs.wiquery:wiquery-core:1.5.6
   > Illegal character in path at index 70: http://repo1.maven.org/maven2/org/codehaus/jackson/jackson-mapper-asl/[1.8,1.8.6],[1.9,1.9.7]/jackson-mapper-asl-[1.8,1.8.6],[1.9,1.9.7].pom

(Peter Niederwieser) #2

Have you been able to verify that the problem is indeed the version notation, and not some other part of the POM?


(Martynas Jurkus) #3

Well, I haven’t tested it, but index 70 is right about here ‘/[1.8,1.8.6],[1.9,1.9.7]/’…

I could try though…