Mei 23, 2014

Maven repository priority in Gradle

If you get an error like this when you execute gradle build, it means that there is something wrong with your maven repository priority (just an example):

Checksum missing at http://www.systap.com/maven/releases/org/semanticweb/yars/nxparser/1.2.3/nxparser-1.2.3.pom.sha1 due to: For input string: "<!"
Download http://www.systap.com/maven/releases/org/semanticweb/yars/nxparser/1.2.3/nxparser-1.2.3.pom
[Fatal Error] nxparser-1.2.3.pom:2:10: Already seen doctype.


Below is a snapshot of my build.gradle:


    // maven repo for BigData - as embedded RDF database
    // we are looking for BigData with Blueprints also
    // needed by BigData: nxparser
    maven { url "http://www.systap.com/maven/releases" }
    maven { url "http://nxparser.googlecode.com/svn/repository" }



My BigData repository need nxparser, but the problem is, maven repo for nxparser reside after BigData repo, so gradle doesn't know that it has to fetch nxparser from repository below. Change the order into this to fix the problem:


    // maven repo for BigData - as embedded RDF database
    // we are looking for BigData with Blueprints also
    // needed by BigData: nxparser
    maven { url "http://nxparser.googlecode.com/svn/repository" }
    maven { url "http://www.systap.com/maven/releases" }