<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" ">
	<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.client</artifactId>
	<packaging>jar</packaging>
	<name>canal client module for otter ${project.version}</name>
	<dependencies>
		<dependency>
			<groupId>com.alibaba.otter</groupId>
			<artifactId>canal.protocol</artifactId>
			<version>${project.version}</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>com.google.protobuf</groupId>
			<artifactId>protobuf-java</artifactId>
		</dependency>

		<!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-all</artifactId>
		</dependency>
		<!-- zk -->
		<dependency>
			<groupId>org.apache.zookeeper</groupId>
			<artifactId>zookeeper</artifactId>
		</dependency>
		<dependency>
			<groupId>com.101tec</groupId>
			<artifactId>zkclient</artifactId>
		</dependency>
		<!-- external -->
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>
		<!-- log -->
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring_version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.rocketmq</groupId>
			<artifactId>rocketmq-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.rocketmq</groupId>
			<artifactId>rocketmq-acl</artifactId>
		</dependency>
		<!-- 客户端要使用请单独引入kafka-clients依赖 -->
		<dependency>
			<groupId>org.apache.kafka</groupId>
			<artifactId>kafka-clients</artifactId>
			<version>1.1.1</version>
			<scope>provided</scope>
		</dependency>

		<!-- junit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.4.1</version>
				<configuration>
					<createDependencyReducedPom>false</createDependencyReducedPom>
					<artifactSet>
						<includes>
							<include>com.alibaba.otter:*</include>
							<include>com.google.guava:*</include>
							<include>org.joda:*</include>
							<include>com.google.common:*</include>
							<include>com.google.thirdparty:*</include>
						</includes>
					</artifactSet>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<relocations>
								<relocation>
									<pattern>com.google.guava</pattern>
									<shadedPattern>com.alibaba.google.guava</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.joda</pattern>
									<shadedPattern>com.alibaba.google.joda</shadedPattern>
								</relocation>
								<relocation>
									<pattern>com.google.common</pattern>
									<shadedPattern>com.alibaba.google.common</shadedPattern>
								</relocation>
								<relocation>
									<pattern>com.google.thirdparty</pattern>
									<shadedPattern>com.alibaba.google.thirdparty</shadedPattern>
								</relocation>
							</relocations>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>dev</id>
			<activation>
				<activeByDefault>true</activeByDefault>
				<property>
					<name>env</name>
					<value>!javadoc</value>
				</property>
			</activation>
		</profile>

		<profile>
			<id>javadoc</id>
			<activation>
				<property>
					<name>env</name>
					<value>javadoc</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.9.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<aggregate>true</aggregate>
							<show>public</show>
							<nohelp>true</nohelp>
							<header>${project.artifactId}-${project.version}</header>
							<footer>${project.artifactId}-${project.version}</footer>
							<doctitle>${project.artifactId}-${project.version}</doctitle>
							<links>
								<link>https://github.com/alibaba/canal</link>
							</links>
							<outputDirectory>${project.build.directory}/apidocs/apidocs/${project.version}</outputDirectory>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-scm-publish-plugin</artifactId>
						<version>1.0-beta-2</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<phase>package</phase>
								<goals>
									<goal>publish-scm</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<checkoutDirectory>${project.build.directory}/scmpublish</checkoutDirectory>
							<checkinComment>Publishing javadoc for ${project.artifactId}:${project.version}</checkinComment>
							<content>${project.build.directory}/apidocs</content>
							<skipDeletedFiles>true</skipDeletedFiles>
							<pubScmUrl>scm:git:git@github.com:alibaba/canal.git</pubScmUrl>
							<scmBranch>gh-pages</scmBranch>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
