groovy hadoop jar with gradle - package not exist error groovy hadoop jar with gradle - package not exist error hadoop hadoop

groovy hadoop jar with gradle - package not exist error


The import statements are in code that is in buildSrc and not main, which means that the dependencies are required by the buildscript dependencies section.

Instead you are applying dependencies to the general dependencies section which applies to source which lives in the main directory.

Add to your build.gradle:

buildscript{    repositories {        mavenCentral()    }    dependencies {        compile 'org.codehaus.groovy:groovy-all:2.0.0'        compile 'org.apache.hadoop:hadoop-common:2.7.1'    }}