130 lines
5.2 KiB
XML
130 lines
5.2 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>com.heibaiying</groupId>
|
|
<artifactId>spark-streaming-flume</artifactId>
|
|
<version>1.0</version>
|
|
|
|
<properties>
|
|
<scala.version>2.11</scala.version>
|
|
<spark.version>2.4.0</spark.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- Spark Streaming-->
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-streaming_${scala.version}</artifactId>
|
|
<version>${spark.version}</version>
|
|
</dependency>
|
|
<!-- Spark Streaming整合Flume依赖-->
|
|
<dependency>
|
|
<groupId>org.apache.spark</groupId>
|
|
<artifactId>spark-streaming-flume_${scala.version}</artifactId>
|
|
<version>2.4.3</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.scala-lang</groupId>
|
|
<artifactId>scala-library</artifactId>
|
|
<version>2.12.8</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
<version>3.5</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<source>8</source>
|
|
<target>8</target>
|
|
</configuration>
|
|
</plugin>
|
|
<!--使用shade进行打包-->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<configuration>
|
|
<createDependencyReducedPom>true</createDependencyReducedPom>
|
|
<filters>
|
|
<filter>
|
|
<artifact>*:*</artifact>
|
|
<excludes>
|
|
<exclude>META-INF/*.SF</exclude>
|
|
<exclude>META-INF/*.sf</exclude>
|
|
<exclude>META-INF/*.DSA</exclude>
|
|
<exclude>META-INF/*.dsa</exclude>
|
|
<exclude>META-INF/*.RSA</exclude>
|
|
<exclude>META-INF/*.rsa</exclude>
|
|
<exclude>META-INF/*.EC</exclude>
|
|
<exclude>META-INF/*.ec</exclude>
|
|
<exclude>META-INF/MSFTSIG.SF</exclude>
|
|
<exclude>META-INF/MSFTSIG.RSA</exclude>
|
|
</excludes>
|
|
</filter>
|
|
</filters>
|
|
<artifactSet>
|
|
<excludes>
|
|
<exclude>org.apache.spark:spark-streaming_${scala.version}</exclude>
|
|
<exclude>org.scala-lang:scala-library</exclude>
|
|
<exclude>org.apache.commons:commons-lang3</exclude>
|
|
</excludes>
|
|
</artifactSet>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>shade</goal>
|
|
</goals>
|
|
<configuration>
|
|
<transformers>
|
|
<transformer
|
|
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
|
<transformer
|
|
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
</transformer>
|
|
</transformers>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!--打包.scala文件需要配置此插件-->
|
|
<plugin>
|
|
<groupId>org.scala-tools</groupId>
|
|
<artifactId>maven-scala-plugin</artifactId>
|
|
<version>2.15.1</version>
|
|
<executions>
|
|
<execution>
|
|
<id>scala-compile</id>
|
|
<goals>
|
|
<goal>compile</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/*.scala</include>
|
|
</includes>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>scala-test-compile</id>
|
|
<goals>
|
|
<goal>testCompile</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
|
|
</project> |