<?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.qcloud</groupId>
    <artifactId>ofs-sdk-definition</artifactId>
    <version>1.0.4</version>

    <name>chdfs-hadoop-sdk-definition</name>
    <description>Tencent Qcloud chdfs hadoop sdk definition.</description>
    <url>https://github.com/tencentyun/chdfs-hadoop-sdk-definition</url>

    <licenses>
        <license>
            <name>chdfs-hadoop-sdk-definition</name>
            <url>https://github.com/tencentyun/chdfs-hadoop-sdk-definition</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>chengwu</name>
            <email>chengwu@tencent.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/tencentyun/chdfs-hadoop-sdk-definition.git
        </connection>
        <developerConnection>
            scm:git:https://github.com/tencentyun/chdfs-hadoop-sdk-definition.git
        </developerConnection>
        <url>https://github.com/tencentyun/chdfs-hadoop-sdk-definition</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <protobuf.version>2.5.0</protobuf.version>
        <hadoop.version>2.8.5</hadoop.version>
    </properties>

    <distributionManagement>
       <!-- <repository>
            <id>cos-inner-maven-repository</id>
            <name>cos-inner-maven-repository</name>
            <url>https://mirrors.tencent.com/repository/maven/QCLOUD_COS</url>
        </repository>
        <snapshotRepository>
            <id>cos-inner-maven-repository</id>
            <name>cos-inner-maven-repository</name>
            <url>https://mirrors.tencent.com/repository/maven/QCLOUD_COS</url>
        </snapshotRepository>-->
        <repository>
            <id>oss</id>
            <name>chdfs-hadoop-sdk-definition</name>
            <url>
                https://oss.sonatype.org/service/local/staging/deploy/maven2
            </url>
        </repository>

        <snapshotRepository>
            <id>oss</id>
            <name>chdfs-hadoop-sdk-definition</name>
            <url>
                https://oss.sonatype.org/content/repositories/snapshots
            </url>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-common</artifactId>
            <version>${hadoop.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.5.0.Final</version>
            </extension>
        </extensions>

        <plugins>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.5.1</version>
                <configuration>
                    <protoSourceRoot>${project.basedir}/src/main/proto</protoSourceRoot>
                    <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
                    </protocArtifact>
                </configuration>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>regex-property</id>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <configuration>
                            <name>underline_project_version</name>
                            <value>${project.version}</value>
                            <regex>\.</regex>
                            <replacement>_</replacement>
                            <failIfNoMatch>true</failIfNoMatch>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <additionalJOption>-Xdoclint:none</additionalJOption>
                </configuration>
                <executions>
                    <execution>
                        <id>javadoc-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <executions>
                    <execution>
                        <id>deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>