intellij-ideagradledependencieslog4j

Gradle not downloading dependencies in intelliJ idea


I am building a Java project in Intellij Idea IDE. Following is my build.gradle file:

group 'fyp_group09'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.5

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'
    compile 'log4j:log4j:1.2.17'
}

I use a proxy connection provided by school and have done the required proxy setup in the IDE. The log4j dependencies are not getting downloaded. I've refreshed the gradle project many times, but it does not download the dependencies and does not even give any error. How can I solve this problem?


Solution

  • The following trick as given here, worked well for me:

    Un-check "Offline work" in File>Settings>Gradle>Global Gradle Settings