Gradle trying to unzip a pom typed dependency

2.8k Views Asked by At

In a project of mine I have a dependency on a java matrix library MTJ which I specify like this in build.gradle:

dependencies {
  ...
  compile 'com.googlecode.matrix-toolkits-java:mtj:1.0.4'
  ...
}

MTJ in turns depends on netlib, more concretely it would be the equivalent of explicitly adding compile 'com.github.fommil.netlib:all:1.1.2' above.

When I run the gradle build. I get the following error:

Could not expand ZIP '/Users/valentin/.gradle/caches/modules-2/files-2.1/com.github.fommil.netlib/all/1.1.2/f235011206ac009adad2d6607f222649aba5ca9e/all-1.1.2.pom'. 
archive is not a ZIP archive.

So somehow gradle is confused and treats the file as been a zip file when it is just a pom that points to other dependencies.

Anyone has a fix or knows of a workaround?

1

There are 1 best solutions below

4
On BEST ANSWER

Please have a look here. The dependency you specified is of type pom - this type in maven is used to aggregate projects. Gradle downloads it, tries to unzip and fails. It seems that this is not what you're looking for. Here you can find other artifacts for group: com.github.fommil.netlib. Please find a jar you're looking for and specify the dependency directly.