2.0重构版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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