|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- <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>
-
- <parent>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>2.6.9</version>
- <relativePath/> <!-- lookup parent from repository -->
- </parent>
-
- <groupId>cc.smtweb</groupId>
- <artifactId>canal.deployer</artifactId>
- <version>1.1.6</version>
-
- <dependencies>
-
- <dependency>
- <groupId>com.alibaba.otter</groupId>
- <artifactId>canal.server</artifactId>
- <version>1.1.6</version>
- </dependency>
- <!-- 这里指定runtime的metrics provider-->
- <dependency>
- <groupId>com.alibaba.otter</groupId>
- <artifactId>canal.prometheus</artifactId>
- <version>1.1.6</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba.otter</groupId>
- <artifactId>connector.kafka</artifactId>
- <version>1.1.6</version>
- <exclusions>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>*</groupId>
- </exclusion>
- </exclusions>
- <classifier>jar-with-dependencies</classifier>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.alibaba.otter</groupId>
- <artifactId>connector.rocketmq</artifactId>
- <version>1.1.6</version>
- <exclusions>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>*</groupId>
- </exclusion>
- </exclusions>
- <classifier>jar-with-dependencies</classifier>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.alibaba.otter</groupId>
- <artifactId>connector.rabbitmq</artifactId>
- <version>1.1.6</version>
- <exclusions>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>*</groupId>
- </exclusion>
- </exclusions>
- <classifier>jar-with-dependencies</classifier>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.alibaba.otter</groupId>
- <artifactId>connector.pulsarmq</artifactId>
- <version>1.1.6</version>
- <exclusions>
- <exclusion>
- <artifactId>*</artifactId>
- <groupId>*</groupId>
- </exclusion>
- </exclusions>
- <classifier>jar-with-dependencies</classifier>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-autoconfigure</artifactId>
- </dependency>
-
- <dependency>
- <groupId>cc.smtweb</groupId>
- <artifactId>sw-framework-core</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>cc.smtweb</groupId>
- <artifactId>sw-system-bpm</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
-
- <!--<plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- </plugin>-->
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <addMavenDescriptor>true</addMavenDescriptor>
- </archive>
- <excludes>
- <exclude>**/logback.xml</exclude>
- <exclude>**/canal.properties</exclude>
- <exclude>**/spring/**</exclude>
- <exclude>**/example/**</exclude>
- <exclude>**/mq.yml</exclude>
- </excludes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
- <executions>
- <execution>
- <id>copy-dependencies-to-canal-deployer</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <includeClassifiers>jar-with-dependencies</includeClassifiers>
- <outputDirectory>${project.basedir}/target/canal-deployer/plugin</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <!-- 这是最新版本,推荐使用这个版本 -->
- <version>2.2.1</version>
- <executions>
- <execution>
- <id>assemble</id>
- <goals>
- <goal>single</goal>
- </goals>
- <phase>package</phase>
- </execution>
- </executions>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <attach>false</attach>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>dev</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <property>
- <name>env</name>
- <value>!release</value>
- </property>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <!-- maven assembly插件需要一个描述文件 来告诉插件包的结构以及打包所需的文件来自哪里 -->
- <descriptors>
- <descriptor>${basedir}/src/main/assembly/dev.xml</descriptor>
- </descriptors>
- <finalName>canal-deployer</finalName>
- <outputDirectory>${project.build.directory}</outputDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- </profile>
-
- <profile>
- <id>release</id>
- <activation>
- <property>
- <name>env</name>
- <value>release</value>
- </property>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <!-- 发布模式使用的maven assembly插件描述文件 -->
- <descriptors>
- <descriptor>${basedir}/src/main/assembly/release.xml</descriptor>
- </descriptors>
- <!-- 如果一个应用的包含多个deploy模块,如果使用同样的包名, 如果把它们复制的一个目录中可能会失败,所以包名加了 artifactId以示区分 -->
- <finalName>${project.artifactId}-1.1.6</finalName>
- <!-- scm 要求 release 模式打出的包放到顶级目录下的target子目录中 -->
- <outputDirectory>${project.parent.build.directory}</outputDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- </project>
|