I am trying to build an Apache Spark application in Java in Eclipse. I am using Gradle as my build management system. What should I write in my build.gradle
and which gradle commands should I use to do the same thing which this Maven POM and terminal command does?
<project>
<groupId>edu.berkeley</groupId>
<artifactId>simple-project</artifactId>
<modelVersion>4.0.0</modelVersion>
<name>Simple Project</name>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
</project>
and
mvn package
$ YOUR_SPARK_HOME/bin/spark-submit \
--class "SimpleApp" \
--master local[4] \
target/simple-project-1.0.jar
Try this. If it is a Java project, you can remove the first line:
apply plugin: 'scala'
buildscript {
repositories {
mavenCentral()
}
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies{
compile "org.apache.spark:spark-core_2.10:1.6.1"
}
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