<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.0-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>
		</dependency>

		<!-- junit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
	</dependencies>
	
	<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>
