202 lines
5.8 KiB
XML
202 lines
5.8 KiB
XML
<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>com.alibaba.otter</groupId>
|
|
<artifactId>canal</artifactId>
|
|
<version>1.1.4-SNAPSHOT</version>
|
|
<relativePath>../pom.xml</relativePath>
|
|
</parent>
|
|
<groupId>com.alibaba.otter</groupId>
|
|
<artifactId>canal.example</artifactId>
|
|
<packaging>jar</packaging>
|
|
<name>canal example module for otter ${project.version}</name>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.alibaba.otter</groupId>
|
|
<artifactId>canal.client</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.alibaba.otter</groupId>
|
|
<artifactId>canal.protocol</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>druid</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.ddlutils</groupId>
|
|
<artifactId>ddlutils</artifactId>
|
|
<version>1.0</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>commons-beanutils</groupId>
|
|
<artifactId>commons-beanutils-core</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>commons-lang</groupId>
|
|
<artifactId>commons-lang</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>commons-dbcp</groupId>
|
|
<artifactId>commons-dbcp</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>commons-pool</groupId>
|
|
<artifactId>commons-pool</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>commons-logging</groupId>
|
|
<artifactId>commons-logging-api</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>dom4j</groupId>
|
|
<artifactId>dom4j</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>stax</groupId>
|
|
<artifactId>stax-api</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>commons-collections</groupId>
|
|
<artifactId>commons-collections</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>commons-digester</groupId>
|
|
<artifactId>commons-digester</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>commons-betwixt</groupId>
|
|
<artifactId>commons-betwixt</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-pool2</artifactId>
|
|
<version>2.5.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>commons-beanutils</groupId>
|
|
<artifactId>commons-beanutils</artifactId>
|
|
<version>1.8.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
<version>3.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>commons-collections</groupId>
|
|
<artifactId>commons-collections</artifactId>
|
|
<version>3.2</version>
|
|
</dependency>
|
|
|
|
<!-- test dependency -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<!-- deploy模块的packaging通常是jar,如果项目中没有java 源代码或资源文件,加上这一段配置使项目能通过构建 -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>2.5</version>
|
|
<configuration>
|
|
<archive>
|
|
<addMavenDescriptor>true</addMavenDescriptor>
|
|
</archive>
|
|
</configuration>
|
|
</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-example</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}-${project.version}</finalName>
|
|
<!-- scm 要求 release 模式打出的包放到顶级目录下的target子目录中 -->
|
|
<outputDirectory>${project.parent.build.directory}</outputDirectory>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|