Created
March 8, 2019 18:08
-
-
Save NiccoMlt/5160ec29d499ce9ac800f76d1e1431d1 to your computer and use it in GitHub Desktop.
Gradle buildscript for Hadoop executable - Unibo BigData course 2019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Gradle buildscript to compile jars for execution on Hadoop and HDFS. | |
* | |
* This buildscript was written by Niccolò Maltoni on 08/03/2019 during laboratory lesson of Big Data. | |
*/ | |
plugins { | |
`java-library` | |
} | |
repositories { | |
mavenLocal() | |
jcenter() | |
// Cloudera Release Repo needed for those specific hadoop libraries versions | |
// (probably not needed if using other versions) | |
maven("https://repository.cloudera.com/content/repositories/releases/") | |
// Cloudera Third-Party Repo needed for Cloudera-specific dependencies | |
// (probably not needed if using other versions) | |
maven("https://repository.cloudera.com/content/repositories/third-party/") | |
} | |
dependencies { | |
// Using 2.6.0-cdh5.13.1 Cloudera-specific versions | |
// because those are the ones used on the server provided by University | |
// https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common | |
implementation("org.apache.hadoop:hadoop-common:2.6.0-cdh5.13.1") | |
// https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-core | |
implementation("org.apache.hadoop:hadoop-core:2.6.0-mr1-cdh5.13.1") | |
// https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-hdfs | |
implementation("org.apache.hadoop:hadoop-hdfs:2.6.0-cdh5.13.1") | |
// Use JUnit test framework | |
testImplementation("junit:junit:4.12") | |
} | |
java { | |
// Using Java 7 version because that is the one used on the server provided by University | |
sourceCompatibility = JavaVersion.VERSION_1_7 | |
targetCompatibility = JavaVersion.VERSION_1_7 | |
} | |
tasks { | |
"jar"(Jar::class) { | |
// Jar Task outputs only compiled code without dependencies | |
enabled = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment