Skip to content

Commit 4151d2a

Browse files
create pom.xml for spark with java project
1 parent 7afe5f7 commit 4151d2a

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

pom.xml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>com.jobreadyprogrammer</groupId>
4+
<artifactId>learningspark</artifactId>
5+
<version>0.0.1-SNAPSHOT</version>
6+
<packaging>jar</packaging>
7+
8+
9+
<properties>
10+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11+
<java.version>1.8</java.version>
12+
<scala.version>2.11</scala.version>
13+
<spark.version>2.3.1</spark.version>
14+
<maven.compiler.source>1.8</maven.compiler.source>
15+
<maven.compiler.target>1.8</maven.compiler.target>
16+
</properties>
17+
18+
<dependencies>
19+
<!-- Spark -->
20+
<dependency>
21+
<groupId>org.apache.spark</groupId>
22+
<artifactId>spark-core_${scala.version}</artifactId>
23+
<version>${spark.version}</version>
24+
</dependency>
25+
26+
<dependency>
27+
<groupId>org.apache.spark</groupId>
28+
<artifactId>spark-sql_${scala.version}</artifactId>
29+
<version>${spark.version}</version>
30+
<exclusions>
31+
<exclusion>
32+
<groupId>org.slf4j</groupId>
33+
<artifactId>slf4j-simple</artifactId>
34+
</exclusion>
35+
</exclusions>
36+
</dependency>
37+
38+
<dependency>
39+
<groupId>org.apache.spark</groupId>
40+
<artifactId>spark-mllib_${scala.version}</artifactId>
41+
<version>${spark.version}</version>
42+
<exclusions>
43+
<exclusion>
44+
<groupId>org.slf4j</groupId>
45+
<artifactId>slf4j-log4j12</artifactId>
46+
</exclusion>
47+
<exclusion>
48+
<groupId>org.slf4j</groupId>
49+
<artifactId>slf4j-simple</artifactId>
50+
</exclusion>
51+
</exclusions>
52+
</dependency>
53+
54+
<dependency>
55+
<groupId>junit</groupId>
56+
<artifactId>junit</artifactId>
57+
<version>4.11</version>
58+
<scope>test</scope>
59+
</dependency>
60+
61+
</dependencies>
62+
63+
<build>
64+
65+
<plugins>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-dependency-plugin</artifactId>
69+
<executions>
70+
<execution>
71+
<id>copy-dependencies</id>
72+
<phase>prepare-package</phase>
73+
<goals>
74+
<goal>copy-dependencies</goal>
75+
</goals>
76+
<configuration>
77+
<outputDirectory>
78+
${project.build.directory}/libs
79+
</outputDirectory>
80+
</configuration>
81+
</execution>
82+
</executions>
83+
</plugin>
84+
85+
86+
<plugin>
87+
<groupId>org.springframework.boot</groupId>
88+
<artifactId>spring-boot-maven-plugin</artifactId>
89+
<executions>
90+
<execution>
91+
<goals>
92+
<goal>repackage</goal>
93+
</goals>
94+
<configuration>
95+
96+
<mainClass>com.jobreadyprogrammer.spark.Application</mainClass>
97+
98+
</configuration>
99+
</execution>
100+
</executions>
101+
</plugin>
102+
103+
104+
</plugins>
105+
106+
107+
</build>
108+
109+
110+
</project>

0 commit comments

Comments
 (0)