Add the two classpath variables GRADLE_HOME and GRADLE_REPO in eclipse in the below location:
Windows -> Preferences -> Java -> Build Path -> Classpath Variables
GRADLE_HOME
to be set to the Gradle Installation directory
GRADLE_REPO
to be set to the cache folder inside .gradle (EXAMPLE : C:\users\user1\.gradle\caches :This location jars will be saved from repo.
Once the variables are set make sure build.gradle has the proper plugin defined depending on the eclipse version you are using:
apply plugin 'eclipse'
apply plugin 'eclipse-wtp'
Use the below configuration in build.gradle to resolve deployment issue:
eclipse {
wtp {
component {
libConfigurations += [configurations.runtimeClasspath]
}
}
}
Then follow the below steps:
Project -> clean
Right click on the Project ->Gradle ->Refresh Gradle Project
If the above steps doesn't resolve the issue it is advise to check if the build process is able to download the jars from artifactory/nexus as due to authentication error or wrong url of artifactory/nexus jar download fails.