<?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.envisioniot</groupId>
    <artifactId>apim-poseidon</artifactId>
    <version>0.2.8</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <!--okhttp3-->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>3.14.9</version>
        </dependency>

        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
            <version>1.60</version>
        </dependency>

        <!--fastjson-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.83</version>
        </dependency>

        <dependency>
            <groupId>org.tinylog</groupId>
            <artifactId>tinylog</artifactId>
            <version>1.3.6</version>
        </dependency>

        <!-- junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>com.envision.apim.poseidon.core.Poseidon</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.1</version>
                <configuration>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>META-INF/*.SF</exclude>
                                <exclude>META-INF/*.DSA</exclude>
                                <exclude>META-INF/*.RSA</exclude>
                            </excludes>
                        </filter>
                    </filters>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createSourcesJar>true</createSourcesJar>
                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
                            <shadeSourcesContent>true</shadeSourcesContent>
                            <artifactSet>
                                <includes>
                                    <include>org.tinylog:tinylog</include>
                                    <include>org.bouncycastle:bcpkix-jdk15on</include>
                                    <include>org.bouncycastle:bcprov-jdk15on</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <!-- tinylog -->
                                <relocation>
                                    <pattern>org.pmw.tinylog</pattern>
                                    <shadedPattern>com.envision.enos.poseidon.shade.org.pmw.tinylog</shadedPattern>
                                </relocation>
                                <!-- bcpkix -->
                                <relocation>
                                    <pattern>org.bouncycastle</pattern>
                                    <shadedPattern>com.envision.enos.poseidon.shade.org.bouncycastle</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <scm>
        <url>http://git.envisioncn.com/APG/apim-poseidon.git</url>
        <connection>scm:git:http://git.envisioncn.com/APG/apim-poseidon.git</connection>
        <developerConnection>scm:git:http://git.envisioncn.com/APG/apim-poseidon.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <developers>
        <developer>
            <id>EnvisionIot</id>
            <name>EnOS Core</name>
            <email>sw.tc@envisioncn.com</email>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>envision.repo</id>
            <name>envision internal repository for released artifacts</name>
            <url>http://nexus.envisioncn.com/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>envision.repo.snapshots</id>
            <name>envision internal repository for snapshots artifacts</name>
            <url>http://nexus.envisioncn.com/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

</project>