167 lines
4.8 KiB
XML
167 lines
4.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<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">
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>org.example</groupId>
|
|
<artifactId>spark_project</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>spark_project</name>
|
|
<url>http://maven.apache.org</url>
|
|
|
|
<properties>
|
|
<!-- Java -->
|
|
<maven.compiler.source>8</maven.compiler.source>
|
|
<maven.compiler.target>8</maven.compiler.target>
|
|
|
|
<!-- Scala -->
|
|
<scala.version>2.11.12</scala.version>
|
|
|
|
<!-- Spark -->
|
|
<spark.version>2.4.3</spark.version>
|
|
|
|
<!-- Hadoop -->
|
|
<hadoop.version>2.7.3</hadoop.version>
|
|
|
|
<!-- Encoding -->
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
|
|
<!-- Scala -->
|
|
<dependency>
|
|
<groupId>org.scala-lang</groupId>
|
|
<artifactId>scala-library</artifactId>
|
|
<version>${scala.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Spark Core -->
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-core_2.11</artifactId>
|
|
<version>${spark.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Spark SQL -->
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-sql_2.11</artifactId>
|
|
<version>${spark.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Spark Hive -->
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-hive_2.11</artifactId>
|
|
<version>${spark.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Hive jdbc-->
|
|
<dependency>
|
|
<groupId>org.apache.hive</groupId>
|
|
<artifactId>hive-jdbc</artifactId>
|
|
<version>2.1.0</version>
|
|
</dependency>
|
|
|
|
<!-- Hadoop Client -->
|
|
<dependency>
|
|
<groupId>org.apache.hadoop</groupId>
|
|
<artifactId>hadoop-client</artifactId>
|
|
<version>${hadoop.version}</version>
|
|
</dependency>
|
|
|
|
<!-- MySQL -->
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<version>8.0.28</version>
|
|
</dependency>
|
|
|
|
<!-- HikariCP -->
|
|
<dependency>
|
|
<groupId>com.zaxxer</groupId>
|
|
<artifactId>HikariCP</artifactId>
|
|
<version>4.0.3</version>
|
|
</dependency>
|
|
|
|
<!-- DbUtils -->
|
|
<dependency>
|
|
<groupId>commons-dbutils</groupId>
|
|
<artifactId>commons-dbutils</artifactId>
|
|
<version>1.6</version>
|
|
</dependency>
|
|
|
|
<!-- JUnit -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>3.8.1</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<build>
|
|
|
|
<!-- Scala 源码目录 -->
|
|
<sourceDirectory>src/main/scala</sourceDirectory>
|
|
|
|
<plugins>
|
|
|
|
<!-- Scala 编译插件 -->
|
|
<plugin>
|
|
<groupId>net.alchim31.maven</groupId>
|
|
<artifactId>scala-maven-plugin</artifactId>
|
|
<version>4.8.1</version>
|
|
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>compile</goal>
|
|
<goal>testCompile</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- 打包插件 -->
|
|
<plugin>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<version>3.7.1</version>
|
|
|
|
<configuration>
|
|
<descriptorRefs>
|
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
|
</descriptorRefs>
|
|
</configuration>
|
|
|
|
<executions>
|
|
<execution>
|
|
<id>make-assembly</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.8.1</version>
|
|
<configuration>
|
|
<source>1.8</source>
|
|
<target>1.8</target>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</project> |