Gradle doesnt get dependency from project lib

(Padmanabhan Vijendran) #1

Hi All,

I am giving multiple repositories - Nexus public, Nexus Private and flat dir - lib. I put few dependency jar in to the project lib folder which is not available in Nexus repository. But my build command is failing stating that particular jar is not there in Nexus. But I already put that jar in project lib folder. Below are the snippets of build.gradle

repositories {

	  maven {
	    url = ""
	 maven {
	        credentials {
	            username "$User"
	            password "$Password"
	        url = ""
	  flatDir { dirs 'lib' }



Below is my dependency blockā€¦

dependencies {
compile files("lib/htrace-core-3.1.0-incubating.jar")  // I need gradle to find it in lib folder not from nexus..
compile 'io.netty:netty-all:4.0.23.Final'
compile ''
compile 'javax.servlet:servlet-api:2.5'

But When I run the gradle build, I am getting below error

A problem occurred evaluating root project 'root_project'.
> Could not resolve all dependencies for configuration ':subProject:runtime'.
   > Could not find htrace-core.jar (org.apache.htrace:htrace-core:3.1.0-incubating).
     Searched in the following locations:

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

Why it is not looking in to the lib folder even though I explicitly mentioned that? I am new to gradle. So kindly help me to find where I am messing up.