Gradle fails to resolve dependency through Nexus but artifacts downloads in browser

Viewed 3300

Gradle fails to resolve dependency via Nexus Repository where as the artifacts are downloadable through browser. I have the following error

Error:Could not find ecj.jar (org.eclipse.jdt.core.compiler:ecj:4.6.1). Searched in the following locations: http://infynexus/nexus/content/groups/Manoj.P04/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.jar

but this jar is downloadable in the browser Chrome Screenshot

build.gradle

buildscript {
    repositories {
        maven {
            credentials {
                username mavenUser
                password mavenPassword
            }
            url 'http://infynexus/nexus/content/groups/Manoj.P04/'
        }

    }


    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven {
            credentials {
                username mavenUser
                password mavenPassword
            }
            url 'infynexus/nexus/content/groups/Manoj.P04/'
        }

        task clean(type: Delete) {
            delete rootProject.buildDir
        }
    }
}

gradle.properties

org.gradle.jvmargs=-Xmx1536m

mavenUser=xxxx
mavenPassword=xxx
2 Answers
Related