2.0重构版本
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

2 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. <parent>
  4. <groupId>org.springframework.boot</groupId>
  5. <artifactId>spring-boot-starter-parent</artifactId>
  6. <version>2.6.9</version>
  7. <relativePath/> <!-- lookup parent from repository -->
  8. </parent>
  9. <groupId>cc.smtweb</groupId>
  10. <artifactId>canal.server</artifactId>
  11. <version>1.1.6</version>
  12. <dependencies>
  13. <dependency>
  14. <groupId>com.alibaba.otter</groupId>
  15. <artifactId>canal.protocol</artifactId>
  16. <version>1.1.6</version>
  17. </dependency>
  18. <dependency>
  19. <groupId>com.alibaba.otter</groupId>
  20. <artifactId>canal.client</artifactId>
  21. <version>1.1.6</version>
  22. </dependency>
  23. <dependency>
  24. <groupId>com.alibaba.otter</groupId>
  25. <artifactId>canal.server</artifactId>
  26. <version>1.1.6</version>
  27. </dependency>
  28. <!-- 这里指定runtime的metrics provider-->
  29. <dependency>
  30. <groupId>com.alibaba.otter</groupId>
  31. <artifactId>canal.prometheus</artifactId>
  32. <version>1.1.6</version>
  33. <scope>runtime</scope>
  34. </dependency>
  35. <dependency>
  36. <groupId>com.alibaba.otter</groupId>
  37. <artifactId>connector.kafka</artifactId>
  38. <version>1.1.6</version>
  39. <exclusions>
  40. <exclusion>
  41. <artifactId>*</artifactId>
  42. <groupId>*</groupId>
  43. </exclusion>
  44. </exclusions>
  45. <classifier>jar-with-dependencies</classifier>
  46. <scope>provided</scope>
  47. </dependency>
  48. <dependency>
  49. <groupId>com.alibaba.otter</groupId>
  50. <artifactId>connector.rocketmq</artifactId>
  51. <version>1.1.6</version>
  52. <exclusions>
  53. <exclusion>
  54. <artifactId>*</artifactId>
  55. <groupId>*</groupId>
  56. </exclusion>
  57. </exclusions>
  58. <classifier>jar-with-dependencies</classifier>
  59. <scope>provided</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>com.alibaba.otter</groupId>
  63. <artifactId>connector.rabbitmq</artifactId>
  64. <version>1.1.6</version>
  65. <exclusions>
  66. <exclusion>
  67. <artifactId>*</artifactId>
  68. <groupId>*</groupId>
  69. </exclusion>
  70. </exclusions>
  71. <classifier>jar-with-dependencies</classifier>
  72. <scope>provided</scope>
  73. </dependency>
  74. <dependency>
  75. <groupId>com.alibaba.otter</groupId>
  76. <artifactId>connector.pulsarmq</artifactId>
  77. <version>1.1.6</version>
  78. <exclusions>
  79. <exclusion>
  80. <artifactId>*</artifactId>
  81. <groupId>*</groupId>
  82. </exclusion>
  83. </exclusions>
  84. <classifier>jar-with-dependencies</classifier>
  85. <scope>provided</scope>
  86. </dependency>
  87. <dependency>
  88. <groupId>org.springframework.boot</groupId>
  89. <artifactId>spring-boot-autoconfigure</artifactId>
  90. </dependency>
  91. <dependency>
  92. <groupId>cc.smtweb</groupId>
  93. <artifactId>sw-framework-core</artifactId>
  94. <version>3.1.0-SNAPSHOT</version>
  95. <scope>compile</scope>
  96. </dependency>
  97. <dependency>
  98. <groupId>cc.smtweb</groupId>
  99. <artifactId>sw-system-bpm</artifactId>
  100. <version>3.1.0-SNAPSHOT</version>
  101. <scope>compile</scope>
  102. </dependency>
  103. </dependencies>
  104. <build>
  105. <plugins>
  106. <plugin>
  107. <artifactId>maven-jar-plugin</artifactId>
  108. <configuration>
  109. <archive>
  110. <addMavenDescriptor>true</addMavenDescriptor>
  111. </archive>
  112. <excludes>
  113. <exclude>**/logback.xml</exclude>
  114. <exclude>**/canal.properties</exclude>
  115. <exclude>**/spring/**</exclude>
  116. <exclude>**/example/**</exclude>
  117. <exclude>**/mq.yml</exclude>
  118. </excludes>
  119. </configuration>
  120. </plugin>
  121. <plugin>
  122. <groupId>org.apache.maven.plugins</groupId>
  123. <artifactId>maven-dependency-plugin</artifactId>
  124. <version>2.10</version>
  125. <executions>
  126. <execution>
  127. <id>copy-dependencies-to-canal-deployer</id>
  128. <phase>package</phase>
  129. <goals>
  130. <goal>copy-dependencies</goal>
  131. </goals>
  132. <configuration>
  133. <includeClassifiers>jar-with-dependencies</includeClassifiers>
  134. <outputDirectory>${project.basedir}/target/canal/plugin</outputDirectory>
  135. </configuration>
  136. </execution>
  137. </executions>
  138. </plugin>
  139. <plugin>
  140. <groupId>org.apache.maven.plugins</groupId>
  141. <artifactId>maven-assembly-plugin</artifactId>
  142. <!-- 这是最新版本,推荐使用这个版本 -->
  143. <version>2.2.1</version>
  144. <executions>
  145. <execution>
  146. <id>assemble</id>
  147. <goals>
  148. <goal>single</goal>
  149. </goals>
  150. <phase>package</phase>
  151. </execution>
  152. </executions>
  153. <configuration>
  154. <appendAssemblyId>false</appendAssemblyId>
  155. <attach>false</attach>
  156. </configuration>
  157. </plugin>
  158. </plugins>
  159. </build>
  160. <profiles>
  161. <profile>
  162. <id>dev</id>
  163. <activation>
  164. <activeByDefault>true</activeByDefault>
  165. <property>
  166. <name>env</name>
  167. <value>!release</value>
  168. </property>
  169. </activation>
  170. <build>
  171. <plugins>
  172. <plugin>
  173. <artifactId>maven-assembly-plugin</artifactId>
  174. <configuration>
  175. <!-- maven assembly插件需要一个描述文件 来告诉插件包的结构以及打包所需的文件来自哪里 -->
  176. <descriptors>
  177. <descriptor>${basedir}/src/main/assembly/dev.xml</descriptor>
  178. </descriptors>
  179. <finalName>canal</finalName>
  180. <outputDirectory>${project.build.directory}</outputDirectory>
  181. </configuration>
  182. </plugin>
  183. </plugins>
  184. </build>
  185. </profile>
  186. <profile>
  187. <id>release</id>
  188. <activation>
  189. <property>
  190. <name>env</name>
  191. <value>release</value>
  192. </property>
  193. </activation>
  194. <build>
  195. <plugins>
  196. <plugin>
  197. <artifactId>maven-assembly-plugin</artifactId>
  198. <configuration>
  199. <!-- 发布模式使用的maven assembly插件描述文件 -->
  200. <descriptors>
  201. <descriptor>${basedir}/src/main/assembly/release.xml</descriptor>
  202. </descriptors>
  203. <!-- 如果一个应用的包含多个deploy模块,如果使用同样的包名, 如果把它们复制的一个目录中可能会失败,所以包名加了 artifactId以示区分 -->
  204. <finalName>${project.artifactId}-1.1.6</finalName>
  205. <!-- scm 要求 release 模式打出的包放到顶级目录下的target子目录中 -->
  206. <outputDirectory>${project.parent.build.directory}</outputDirectory>
  207. </configuration>
  208. </plugin>
  209. </plugins>
  210. </build>
  211. </profile>
  212. </profiles>
  213. </project>