pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <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">
  3. <parent>
  4. <artifactId>canal.client-adapter</artifactId>
  5. <groupId>com.alibaba.otter</groupId>
  6. <version>1.1.6-SNAPSHOT</version>
  7. <relativePath>../pom.xml</relativePath>
  8. </parent>
  9. <modelVersion>4.0.0</modelVersion>
  10. <groupId>com.alibaba.otter</groupId>
  11. <artifactId>client-adapter.launcher</artifactId>
  12. <packaging>jar</packaging>
  13. <name>canal client adapter launcher module for otter ${project.version}</name>
  14. <dependencyManagement>
  15. <dependencies>
  16. <dependency>
  17. <groupId>org.springframework.boot</groupId>
  18. <artifactId>spring-boot-dependencies</artifactId>
  19. <version>2.0.1.RELEASE</version>
  20. <type>pom</type>
  21. <scope>import</scope>
  22. </dependency>
  23. </dependencies>
  24. </dependencyManagement>
  25. <dependencies>
  26. <dependency>
  27. <groupId>com.alibaba.otter</groupId>
  28. <artifactId>client-adapter.common</artifactId>
  29. <version>${project.version}</version>
  30. </dependency>
  31. <dependency>
  32. <groupId>org.yaml</groupId>
  33. <artifactId>snakeyaml</artifactId>
  34. </dependency>
  35. <dependency>
  36. <groupId>org.springframework.boot</groupId>
  37. <artifactId>spring-boot-starter-web</artifactId>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.springframework.boot</groupId>
  41. <artifactId>spring-boot-configuration-processor</artifactId>
  42. <scope>provided</scope>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.springframework.cloud</groupId>
  46. <artifactId>spring-cloud-context</artifactId>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.apache.curator</groupId>
  50. <artifactId>curator-recipes</artifactId>
  51. </dependency>
  52. <!-- jdbc -->
  53. <dependency>
  54. <groupId>mysql</groupId>
  55. <artifactId>mysql-connector-java</artifactId>
  56. </dependency>
  57. <dependency>
  58. <groupId>org.postgresql</groupId>
  59. <artifactId>postgresql</artifactId>
  60. </dependency>
  61. <dependency>
  62. <groupId>com.oracle</groupId>
  63. <artifactId>ojdbc6</artifactId>
  64. </dependency>
  65. <dependency>
  66. <groupId>com.microsoft.sqlserver</groupId>
  67. <artifactId>mssql-jdbc</artifactId>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.apache.hbase</groupId>
  71. <artifactId>hbase-shaded-client</artifactId>
  72. <scope>runtime</scope>
  73. </dependency>
  74. <!-- outer adapter jar with dependencies-->
  75. <dependency>
  76. <groupId>com.alibaba.otter</groupId>
  77. <artifactId>client-adapter.logger</artifactId>
  78. <version>${project.version}</version>
  79. <exclusions>
  80. <exclusion>
  81. <artifactId>*</artifactId>
  82. <groupId>*</groupId>
  83. </exclusion>
  84. </exclusions>
  85. <classifier>jar-with-dependencies</classifier>
  86. <scope>provided</scope>
  87. </dependency>
  88. <dependency>
  89. <groupId>com.alibaba.otter</groupId>
  90. <artifactId>client-adapter.hbase</artifactId>
  91. <version>${project.version}</version>
  92. <exclusions>
  93. <exclusion>
  94. <artifactId>*</artifactId>
  95. <groupId>*</groupId>
  96. </exclusion>
  97. </exclusions>
  98. <classifier>jar-with-dependencies</classifier>
  99. <scope>provided</scope>
  100. </dependency>
  101. <dependency>
  102. <groupId>com.alibaba.otter</groupId>
  103. <artifactId>client-adapter.es6x</artifactId>
  104. <version>${project.version}</version>
  105. <exclusions>
  106. <exclusion>
  107. <artifactId>*</artifactId>
  108. <groupId>*</groupId>
  109. </exclusion>
  110. </exclusions>
  111. <classifier>jar-with-dependencies</classifier>
  112. <scope>provided</scope>
  113. </dependency>
  114. <dependency>
  115. <groupId>com.alibaba.otter</groupId>
  116. <artifactId>client-adapter.es7x</artifactId>
  117. <version>${project.version}</version>
  118. <exclusions>
  119. <exclusion>
  120. <artifactId>*</artifactId>
  121. <groupId>*</groupId>
  122. </exclusion>
  123. </exclusions>
  124. <classifier>jar-with-dependencies</classifier>
  125. <scope>provided</scope>
  126. </dependency>
  127. <dependency>
  128. <groupId>com.alibaba.otter</groupId>
  129. <artifactId>client-adapter.rdb</artifactId>
  130. <version>${project.version}</version>
  131. <exclusions>
  132. <exclusion>
  133. <artifactId>*</artifactId>
  134. <groupId>*</groupId>
  135. </exclusion>
  136. </exclusions>
  137. <classifier>jar-with-dependencies</classifier>
  138. <scope>provided</scope>
  139. </dependency>
  140. <!-- connector plugin -->
  141. <dependency>
  142. <groupId>com.alibaba.otter</groupId>
  143. <artifactId>connector.tcp</artifactId>
  144. <version>${project.version}</version>
  145. <exclusions>
  146. <exclusion>
  147. <artifactId>*</artifactId>
  148. <groupId>*</groupId>
  149. </exclusion>
  150. </exclusions>
  151. <classifier>jar-with-dependencies</classifier>
  152. <scope>provided</scope>
  153. </dependency>
  154. <dependency>
  155. <groupId>com.alibaba.otter</groupId>
  156. <artifactId>connector.kafka</artifactId>
  157. <version>${project.version}</version>
  158. <exclusions>
  159. <exclusion>
  160. <artifactId>*</artifactId>
  161. <groupId>*</groupId>
  162. </exclusion>
  163. </exclusions>
  164. <classifier>jar-with-dependencies</classifier>
  165. <scope>provided</scope>
  166. </dependency>
  167. <dependency>
  168. <groupId>com.alibaba.otter</groupId>
  169. <artifactId>connector.rocketmq</artifactId>
  170. <version>${project.version}</version>
  171. <exclusions>
  172. <exclusion>
  173. <artifactId>*</artifactId>
  174. <groupId>*</groupId>
  175. </exclusion>
  176. </exclusions>
  177. <classifier>jar-with-dependencies</classifier>
  178. <scope>provided</scope>
  179. </dependency>
  180. <dependency>
  181. <groupId>com.alibaba.otter</groupId>
  182. <artifactId>connector.rabbitmq</artifactId>
  183. <version>${project.version}</version>
  184. <exclusions>
  185. <exclusion>
  186. <artifactId>*</artifactId>
  187. <groupId>*</groupId>
  188. </exclusion>
  189. </exclusions>
  190. <classifier>jar-with-dependencies</classifier>
  191. <scope>provided</scope>
  192. </dependency>
  193. </dependencies>
  194. <build>
  195. <plugins>
  196. <plugin>
  197. <groupId>org.apache.maven.plugins</groupId>
  198. <artifactId>maven-dependency-plugin</artifactId>
  199. <version>2.10</version>
  200. <executions>
  201. <execution>
  202. <id>copy-dependencies-to-canal-client-service</id>
  203. <phase>package</phase>
  204. <goals>
  205. <goal>copy-dependencies</goal>
  206. </goals>
  207. <configuration>
  208. <includeClassifiers>jar-with-dependencies</includeClassifiers>
  209. <outputDirectory>${project.basedir}/target/canal-adapter/plugin</outputDirectory>
  210. </configuration>
  211. </execution>
  212. </executions>
  213. </plugin>
  214. <plugin>
  215. <groupId>org.apache.maven.plugins</groupId>
  216. <artifactId>maven-assembly-plugin</artifactId>
  217. <version>2.2.1</version>
  218. <executions>
  219. <execution>
  220. <id>assemble</id>
  221. <goals>
  222. <goal>single</goal>
  223. </goals>
  224. <phase>package</phase>
  225. </execution>
  226. </executions>
  227. <configuration>
  228. <appendAssemblyId>false</appendAssemblyId>
  229. <attach>false</attach>
  230. </configuration>
  231. </plugin>
  232. <plugin>
  233. <groupId>org.apache.maven.plugins</groupId>
  234. <artifactId>maven-jar-plugin</artifactId>
  235. <version>3.0.2</version>
  236. <configuration>
  237. <archive>
  238. <manifest>
  239. <addClasspath>true</addClasspath>
  240. <classpathPrefix>lib/</classpathPrefix>
  241. <mainClass>com.alibaba.otter.canal.adapter.launcher.CanalAdapterApplication</mainClass>
  242. </manifest>
  243. </archive>
  244. <excludes>
  245. <exclude>**/*.properties</exclude>
  246. <exclude>**/*.xml</exclude>
  247. <exclude>**/*.yml</exclude>
  248. <exclude>static/**</exclude>
  249. <exclude>templates/**</exclude>
  250. </excludes>
  251. </configuration>
  252. </plugin>
  253. </plugins>
  254. </build>
  255. <profiles>
  256. <profile>
  257. <id>dev</id>
  258. <activation>
  259. <activeByDefault>true</activeByDefault>
  260. <property>
  261. <name>env</name>
  262. <value>!release</value>
  263. </property>
  264. </activation>
  265. <build>
  266. <plugins>
  267. <plugin>
  268. <artifactId>maven-assembly-plugin</artifactId>
  269. <configuration>
  270. <descriptors>
  271. <descriptor>${basedir}/src/main/assembly/dev.xml</descriptor>
  272. </descriptors>
  273. <finalName>canal-adapter</finalName>
  274. <outputDirectory>${project.build.directory}</outputDirectory>
  275. </configuration>
  276. </plugin>
  277. </plugins>
  278. </build>
  279. </profile>
  280. <profile>
  281. <id>release</id>
  282. <activation>
  283. <property>
  284. <name>env</name>
  285. <value>release</value>
  286. </property>
  287. </activation>
  288. <build>
  289. <plugins>
  290. <plugin>
  291. <artifactId>maven-assembly-plugin</artifactId>
  292. <configuration>
  293. <descriptors>
  294. <descriptor>${basedir}/src/main/assembly/release.xml</descriptor>
  295. </descriptors>
  296. <finalName>canal.adapter-${project.version}</finalName>
  297. <outputDirectory>${project.basedir}/../../target</outputDirectory>
  298. </configuration>
  299. </plugin>
  300. </plugins>
  301. </build>
  302. </profile>
  303. </profiles>
  304. </project>