<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>org.sonatype.oss</groupId>	
        <artifactId>oss-parent</artifactId>	
        <version>9</version>	
    </parent>	


    <groupId>com.aliyun.openservices</groupId>
    <artifactId>aliyun-log</artifactId>
	<version>0.6.31</version>
    <packaging>jar</packaging>

    <name>Aliyun LOG Java SDK</name>
    <url>http://www.aliyun.com</url>
    <description>Aliyun LOG Java SDK</description>

    <licenses>
        <license>
            <name />
            <url />
            <distribution>repo</distribution>
            <comments>Copyright (C) Alibaba Cloud Computing. All rights reserved.</comments>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/aliyun/aliyun-log-java-sdk</url>
        <connection>scm:git:git@github.com:aliyun/aliyun-log-java-sdk.git</connection>
        <developerConnection>scm:git:git@github.com:aliyun/aliyun-log-java-sdk.git
        </developerConnection>
    </scm>
    <developers>
        <developer>
            <id>aliyunproducts</id>
            <name>Aliyun Log development team</name>
            <email>aliyunsdk@aliyun.com</email>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.38</version>
        </dependency>
        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
            <classifier>jdk15</classifier>
        </dependency>
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>1.4.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>2.5.0</version>
        </dependency>
        <dependency>
            <groupId>net.jpountz.lz4</groupId>
            <artifactId>lz4</artifactId>
            <version>1.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.1</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <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>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <configuration>
                    <forceCreation>true</forceCreation>
                    <excludes>
                        <exclude>com/aliyun/openservices/log/sample</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <excludes>
                        <exclude>**/oms/**</exclude>
                        <exclude>**/odps/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <argLine>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m
                        -Dfile.encoding=UTF-8
                    </argLine>
                    <excludes>
                        <exclude>**/odps/**</exclude>
                        <exclude>**/oms/**</exclude>
                    </excludes>
                    <forkMode>once</forkMode>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <excludePackageNames>com.aliyun.openservices.log.http.*</excludePackageNames>
                    <tags>
                        <tag>
                            <name>author</name>
                            <placement>X</placement>
                        </tag>
                    </tags>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>1.4</version>
                <configuration>
                    <artifactSet>
                        <excludes>
                            <exclude>com.alibaba:fastjson:jar:</exclude>
                            <exclude>net.sf.json-lib:json-lib:jar:</exclude>
                            <exclude>commons-validator:commons-validator:jar:</exclude>
                            <exclude>net.jpountz.lz4:lz4:jar:</exclude>
                        </excludes>
                    </artifactSet>
                    <relocations>
                        <relocsation>
                            <pattern>com.google.protobuf</pattern>
                            <shadedPattern>com.aliyun.log.thirdparty.com.google.protobuf
                            </shadedPattern>
                        </relocsation>
                        <relocation>
                            <pattern>org.apache.http</pattern>
                            <shadedPattern>com.aliyun.log.thirdparty.org.apache.http</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>org.apache.commons.beanutils</pattern>
                            <shadedPattern>com.aliyun.log.thirdparty.org.apache.commons.beanutils</shadedPattern>
                        </relocation>
                    </relocations>
                    <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
                    <shadedArtifactAttached>true</shadedArtifactAttached>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
