pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one
  3. or more contributor license agreements. See the NOTICE file
  4. distributed with this work for additional information
  5. regarding copyright ownership. The ASF licenses this file
  6. to you under the Apache License, Version 2.0 (the
  7. "License"); you may not use this file except in compliance
  8. with the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing,
  11. software distributed under the License is distributed on an
  12. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  13. KIND, either express or implied. See the License for the
  14. specific language governing permissions and limitations
  15. under the License.
  16. -->
  17. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  18. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  19. <modelVersion>4.0.0</modelVersion>
  20. <groupId>flink.zanxiangnet.ad.monitoring</groupId>
  21. <artifactId>flink-ad-monitoring</artifactId>
  22. <version>1.0-SNAPSHOT</version>
  23. <packaging>jar</packaging>
  24. <name>Flink Walkthrough DataStream Java</name>
  25. <url>https://flink.apache.org</url>
  26. <properties>
  27. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  28. <flink.version>1.14.0</flink.version>
  29. <target.java.version>1.8</target.java.version>
  30. <scala.binary.version>2.11</scala.binary.version>
  31. <maven.compiler.source>${target.java.version}</maven.compiler.source>
  32. <maven.compiler.target>${target.java.version}</maven.compiler.target>
  33. <log4j.version>2.14.1</log4j.version>
  34. <jackson.version>2.13.0</jackson.version>
  35. <odps.version>0.37.10-public</odps.version>
  36. </properties>
  37. <repositories>
  38. <repository>
  39. <id>apache.snapshots</id>
  40. <name>Apache Development Snapshot Repository</name>
  41. <url>https://repository.apache.org/content/repositories/snapshots/</url>
  42. <releases>
  43. <enabled>false</enabled>
  44. </releases>
  45. <snapshots>
  46. <enabled>true</enabled>
  47. </snapshots>
  48. </repository>
  49. </repositories>
  50. <dependencies>
  51. <!-- This dependency is provided, because it should not be packaged into the JAR file. -->
  52. <dependency>
  53. <groupId>org.apache.flink</groupId>
  54. <artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
  55. <version>${flink.version}</version>
  56. <scope>provided</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.apache.flink</groupId>
  60. <artifactId>flink-clients_${scala.binary.version}</artifactId>
  61. <version>${flink.version}</version>
  62. <scope>provided</scope>
  63. </dependency>
  64. <!-- 开启 flink的磁盘 checkpoint -->
  65. <dependency>
  66. <groupId>org.apache.flink</groupId>
  67. <artifactId>flink-statebackend-rocksdb_${scala.binary.version}</artifactId>
  68. <version>${flink.version}</version>
  69. <scope>provided</scope>
  70. </dependency>
  71. <!-- Add connector dependencies here. They must be in the default scope (compile). -->
  72. <!-- kafka作为数据源 -->
  73. <dependency>
  74. <groupId>org.apache.flink</groupId>
  75. <artifactId>flink-connector-kafka_${scala.binary.version}</artifactId>
  76. <version>${flink.version}</version>
  77. </dependency>
  78. <!-- Add logging framework, to produce console output when running in the IDE. -->
  79. <!-- These dependencies are excluded from the application JAR by default. -->
  80. <dependency>
  81. <groupId>org.apache.logging.log4j</groupId>
  82. <artifactId>log4j-slf4j-impl</artifactId>
  83. <version>${log4j.version}</version>
  84. <scope>runtime</scope>
  85. </dependency>
  86. <dependency>
  87. <groupId>org.apache.logging.log4j</groupId>
  88. <artifactId>log4j-api</artifactId>
  89. <version>${log4j.version}</version>
  90. <scope>runtime</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.apache.logging.log4j</groupId>
  94. <artifactId>log4j-core</artifactId>
  95. <version>${log4j.version}</version>
  96. <scope>runtime</scope>
  97. </dependency>
  98. <dependency>
  99. <groupId>com.fasterxml.jackson.core</groupId>
  100. <artifactId>jackson-databind</artifactId>
  101. <version>${jackson.version}</version>
  102. </dependency>
  103. <dependency>
  104. <groupId>com.fasterxml.jackson.datatype</groupId>
  105. <artifactId>jackson-datatype-jsr310</artifactId>
  106. <version>${jackson.version}</version>
  107. </dependency>
  108. <dependency>
  109. <groupId>com.aliyun.odps</groupId>
  110. <artifactId>odps-sdk-core</artifactId>
  111. <version>${odps.version}</version>
  112. </dependency>
  113. <dependency>
  114. <groupId>com.aliyun.oss</groupId>
  115. <artifactId>aliyun-sdk-oss</artifactId>
  116. <version>3.10.2</version>
  117. </dependency>
  118. <dependency>
  119. <groupId>com.tencent.ads</groupId>
  120. <artifactId>marketing-api-java-sdk</artifactId>
  121. <version>1.1.29</version>
  122. </dependency>
  123. <dependency>
  124. <groupId>org.projectlombok</groupId>
  125. <artifactId>lombok</artifactId>
  126. <version>1.18.2</version>
  127. <scope>provided</scope>
  128. </dependency>
  129. <dependency>
  130. <groupId>org.springframework</groupId>
  131. <artifactId>spring-beans</artifactId>
  132. <version>5.2.9.RELEASE</version>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.mybatis</groupId>
  136. <artifactId>mybatis</artifactId>
  137. <version>3.5.8</version>
  138. </dependency>
  139. <!-- HikariCP 连接池 -->
  140. <dependency>
  141. <groupId>com.zaxxer</groupId>
  142. <artifactId>HikariCP</artifactId>
  143. <version>4.0.3</version>
  144. </dependency>
  145. <dependency>
  146. <groupId>ru.yandex.clickhouse</groupId>
  147. <artifactId>clickhouse-jdbc</artifactId>
  148. <version>0.3.1</version>
  149. </dependency>
  150. <!-- Java操作 csv文件 -->
  151. <dependency>
  152. <groupId>org.apache.commons</groupId>
  153. <artifactId>commons-csv</artifactId>
  154. <version>1.9.0</version>
  155. </dependency>
  156. </dependencies>
  157. <build>
  158. <resources>
  159. <resource>
  160. <directory>src/main/java</directory>
  161. <includes>
  162. <include>**/*.xml</include>
  163. </includes>
  164. <filtering>true</filtering>
  165. </resource>
  166. </resources>
  167. <plugins>
  168. <!-- Java Compiler -->
  169. <plugin>
  170. <groupId>org.apache.maven.plugins</groupId>
  171. <artifactId>maven-compiler-plugin</artifactId>
  172. <version>3.1</version>
  173. <configuration>
  174. <source>${target.java.version}</source>
  175. <target>${target.java.version}</target>
  176. </configuration>
  177. </plugin>
  178. <!-- We use the maven-shade plugin to create a fat jar that contains all necessary dependencies. -->
  179. <!-- Change the value of <mainClass>...</mainClass> if your program entry point changes. -->
  180. <plugin>
  181. <groupId>org.apache.maven.plugins</groupId>
  182. <artifactId>maven-shade-plugin</artifactId>
  183. <version>3.0.0</version>
  184. <executions>
  185. <!-- Run shade goal on package phase -->
  186. <execution>
  187. <phase>package</phase>
  188. <goals>
  189. <goal>shade</goal>
  190. </goals>
  191. <configuration>
  192. <artifactSet>
  193. <excludes>
  194. <exclude>org.apache.flink:flink-shaded-force-shading</exclude>
  195. <exclude>com.google.code.findbugs:jsr305</exclude>
  196. <exclude>org.slf4j:*</exclude>
  197. <exclude>org.apache.logging.log4j:*</exclude>
  198. </excludes>
  199. </artifactSet>
  200. <filters>
  201. <filter>
  202. <!-- Do not copy the signatures in the META-INF folder.
  203. Otherwise, this might cause SecurityExceptions when using the JAR. -->
  204. <artifact>*:*</artifact>
  205. <excludes>
  206. <exclude>META-INF/*.SF</exclude>
  207. <exclude>META-INF/*.DSA</exclude>
  208. <exclude>META-INF/*.RSA</exclude>
  209. </excludes>
  210. </filter>
  211. </filters>
  212. <transformers>
  213. <transformer
  214. implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  215. <mainClass>flink.zanxiangnet.ad.monitoring.AdHourStreamJob</mainClass>
  216. </transformer>
  217. </transformers>
  218. </configuration>
  219. </execution>
  220. </executions>
  221. </plugin>
  222. </plugins>
  223. <pluginManagement>
  224. <plugins>
  225. <!-- This improves the out-of-the-box experience in Eclipse by resolving some warnings. -->
  226. <plugin>
  227. <groupId>org.eclipse.m2e</groupId>
  228. <artifactId>lifecycle-mapping</artifactId>
  229. <version>1.0.0</version>
  230. <configuration>
  231. <lifecycleMappingMetadata>
  232. <pluginExecutions>
  233. <pluginExecution>
  234. <pluginExecutionFilter>
  235. <groupId>org.apache.maven.plugins</groupId>
  236. <artifactId>maven-shade-plugin</artifactId>
  237. <versionRange>[3.0.0,)</versionRange>
  238. <goals>
  239. <goal>shade</goal>
  240. </goals>
  241. </pluginExecutionFilter>
  242. <action>
  243. <ignore/>
  244. </action>
  245. </pluginExecution>
  246. <pluginExecution>
  247. <pluginExecutionFilter>
  248. <groupId>org.apache.maven.plugins</groupId>
  249. <artifactId>maven-compiler-plugin</artifactId>
  250. <versionRange>[3.1,)</versionRange>
  251. <goals>
  252. <goal>testCompile</goal>
  253. <goal>compile</goal>
  254. </goals>
  255. </pluginExecutionFilter>
  256. <action>
  257. <ignore/>
  258. </action>
  259. </pluginExecution>
  260. </pluginExecutions>
  261. </lifecycleMappingMetadata>
  262. </configuration>
  263. </plugin>
  264. </plugins>
  265. </pluginManagement>
  266. </build>
  267. </project>