Database Reference
In-Depth Information
Maven expects user code to be in a src/main/java directory relative to the project root
(the root should contain the pom.xml file).
Example 7-5. pom.xml file for a Spark application built with Maven
<project>
<modelVersion> 4.0.0 </modelVersion>
<!-- Information about your project -->
<groupId> com.databricks </groupId>
<artifactId> example-build </artifactId>
<name> Simple Project </name>
<packaging> jar </packaging>
<version> 1.0 </version>
<dependencies>
<!-- Spark dependency -->
<dependency>
<groupId> org.apache.spark </groupId>
<artifactId> spark-core_2.10 </artifactId>
<version> 1.2.0 </version>
<scope> provided </scope>
</dependency>
<!-- Third-party library -->
<dependency>
<groupId> net.sf.jopt-simple </groupId>
<artifactId> jopt-simple </artifactId>
<version> 4.3 </version>
</dependency>
<!-- Third-party library -->
<dependency>
<groupId> joda-time </groupId>
<artifactId> joda-time </artifactId>
<version> 2.0 </version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Maven shade plug-in that creates uber JARs -->
<plugin>
<groupId> org.apache.maven.plugins </groupId>
<artifactId> maven-shade-plugin </artifactId>
<version> 2.3 </version>
<executions>
<execution>
<phase> package </phase>
<goals>
<goal> shade </goal>
</goals>
</execution>
Search WWH ::




Custom Search