Gradle fails to download a dependency if HTTP HEAD is not supported by a web server

(marek.wiacek) #1

The script included below fails with the following error:

./gradlew clean extractValidator

Could not resolve all dependencies for configuration ‘:vnuValidator’.
Could not resolve :vnu:15.4.12.
Required by:
Could not HEAD ‘’. Received status code 403 from server: Forbidden

repositories {
ivy {
url ""
layout “pattern”, {
artifact “[revision]/[module].jar_[revision].[ext]”

apply plugin: “java”

configurations {

dependencies {
vnuValidator “:vnu:15.4.12@zip”

task extractValidator(type: Copy) {
into “$buildDir/vnu”

Use GitHub Releases as dependency repository (Plugin?)
(marek.wiacek) #2

The problem was observed in Gradle 2.2.1.

(IsNull) #3

I just ran into the same issue in my attempt to use GitHub Releases as Maven Repository use-github-releases-as-dependency-repository-plugin

Btw, I’ve generalised the Ivy repo, as long as the jars follow default naming conventions.

    ivy {
        url ''
        layout ('pattern') {
            artifact '[organisation]/releases/download/v[revision]/[artifact]-[revision](-[classifier])(.[ext])'

This way, the dependency can be specified simply as

dependencies {