<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>com.alibaba.csb.sdk</groupId>
    <artifactId>csb.sdk.parent</artifactId>
    <version>1.1.5.2</version>
    <name>CSB :: SDK :: parent</name>
    <packaging>pom</packaging>
    <description>CSB SDK build POM</description>

    <properties>
        <junit.version>4.11</junit.version>
        <gpg.executable>gpg2</gpg.executable>
        <csb.sdk.version>1.1.5.2</csb.sdk.version>
    </properties>

    <modules>
        <module>common</module>
        <module>http-client</module>
        <module>ws-client</module>
    </modules>

    <organization>
        <name>Alibaba Aliware CSB</name>
        <url>http://code.alibabatech.com/</url>
    </organization>

    <url>https://github.com/alibaba/csb-sdk</url>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/alibaba/csb-sdk/issues</url>
    </issueManagement>
    <scm>
        <url>https://github.com/aliyun/csb-sdk.git</url>
    </scm>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly license for Alibaba CSB SDK</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Liaotian(walking98)</name>
            <id>liaotian.wq</id>
            <email>liaotian.wq (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
        <developer>
            <name>yaolan.lt</name>
            <id>jeffeyliu</id>
            <email>yaolan.lt (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
        <developer>
            <name>chentingb</name>
            <id>chentingb</id>
            <email>tingbin.ctb (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <distributionManagement>
                <repository>
                    <id>releases</id>
                    <url>http://mvnrepo.alibaba-inc.com/mvn/releases</url>
                </repository>
                <snapshotRepository>
                    <id>snapshots</id>
                    <url>http://mvnrepo.alibaba-inc.com/mvn/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
        <profile>
            <id>open</id>
            <distributionManagement>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
                </repository>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <show>public</show>
                            <charset>UTF-8</charset>
                            <encoding>UTF-8</encoding>
                            <docencoding>UTF-8</docencoding>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <excludePackageNames>com.alibaba.csb.sdk.internel.*</excludePackageNames>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>2.2.4</version>
                <executions>
                    <execution>
                        <id>get-the-git-infos</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                    <prefix>git</prefix>
                    <verbose>false</verbose>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${project.build.outputDirectory}/csb-sdk-version.properties</generateGitPropertiesFilename>
                    <format>properties</format>
                    <includeOnlyProperties>
                        <onlyProperty>git.branch</onlyProperty>
                        <onlyProperty>git.commit.id</onlyProperty>
                        <onlyProperty>git.build.time</onlyProperty>
                    </includeOnlyProperties>
                    <excludeProperties>
                        <property>git.commit.id.abbrev</property>
                        <property>git.commit.id.describe</property>
                        <property>git.commit.id.describe.short</property>
                    </excludeProperties>
                    <gitDescribe>
                        <skip>false</skip>
                        <always>false</always>
                        <dirty>-dirty</dirty>
                    </gitDescribe>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>native2ascii-maven-plugin</artifactId>
                <version>1.0-beta-1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <src>src/main/resources/i18n/</src>
                    <dest>${outputDirectory}/i18n/</dest>
                    <includes>
                        <include>**/*.properties</include>
                    </includes>
                    <excludes>
                        <exclude>**/csb-sdk-version.properties</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>native2ascii-utf8</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
