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?
In the Gradle tool window, right-click your main project and from the context menu select Composite Build Configuration. In the Gradle Project Build Composite dialog, select projects that you want to include in your Gradle composite build. Re-import your main Gradle project.
The following trick as given here, worked well for me:
Un-check "Offline work" in File>Settings>Gradle>Global Gradle Settings
We had this, worked after doing File>Invalidate Caches / Restart...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With