<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/maven-v4_0_0.xsd">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>5</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.networknt</groupId>
    <artifactId>techempower</artifactId>
    <packaging>jar</packaging>
    <name>techempower</name>
    <version>1.0.0</version>

    <prerequisites>
        <maven>2.2.0</maven>
    </prerequisites>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <version.java>1.8</version.java>
        <version.light-java>1.5.10</version.light-java>
        <version.logback>1.2.3</version.logback>
        <version.undertow>2.0.3.Final</version.undertow>
        <version.jsonpath>2.2.0</version.jsonpath>
        <version.httpclient>4.5.2</version.httpclient>
        <version.httpasyncclient>4.1.2</version.httpasyncclient>
        <version.swagger>1.5.10</version.swagger>
        <version.hikaricp>2.7.8</version.hikaricp>
        <version.mysql>5.1.46</version.mysql>
        <version.postgres>42.2.2</version.postgres>
        <version.dsl-json>1.7.0</version.dsl-json>
        <version.mustache>0.9.5</version.mustache>
        <version.guava>24.1-jre</version.guava>
        <version.maven-compiler-plugin>3.7.0</version.maven-compiler-plugin>
        <version.maven-jar-plugin>3.0.2</version.maven-jar-plugin>
        <version.maven-shade-plugin>3.1.0</version.maven-shade-plugin>
        <version.exec-maven-plugin>1.6.0</version.exec-maven-plugin>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${version.guava}</version>
        </dependency>
        <dependency>
            <groupId>com.networknt</groupId>
            <artifactId>config</artifactId>
            <version>${version.light-java}</version>
        </dependency>
        <dependency>
            <groupId>com.networknt</groupId>
            <artifactId>utility</artifactId>
            <version>${version.light-java}</version>
        </dependency>
        <dependency>
            <groupId>com.networknt</groupId>
            <artifactId>status</artifactId>
            <version>${version.light-java}</version>
        </dependency>
        <dependency>
            <groupId>com.networknt</groupId>
            <artifactId>exception</artifactId>
            <version>${version.light-java}</version>
        </dependency>
        <dependency>
            <groupId>com.networknt</groupId>
            <artifactId>handler</artifactId>
            <version>${version.light-java}</version>
        </dependency>
        <dependency>
            <groupId>com.networknt</groupId>
            <artifactId>service</artifactId>
            <version>${version.light-java}</version>
        </dependency>
        <dependency>
            <groupId>com.networknt</groupId>
            <artifactId>server</artifactId>
            <version>${version.light-java}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${version.logback}</version>
        </dependency>
        <dependency>
            <groupId>io.undertow</groupId>
            <artifactId>undertow-core</artifactId>
            <version>${version.undertow}</version>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>${version.hikaricp}</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${version.mysql}</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${version.postgres}</version>
        </dependency>
        <dependency>
            <groupId>com.dslplatform</groupId>
            <artifactId>dsl-json-processor</artifactId>
            <version>${version.dsl-json}</version>
        </dependency>
        <dependency>
            <groupId>com.github.spullara.mustache.java</groupId>
            <artifactId>compiler</artifactId>
            <version>${version.mustache}</version>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>
        <directory>target</directory>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>${version.maven-shade-plugin}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${version.maven-jar-plugin}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.networknt.server.Server</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>${version.exec-maven-plugin}</version>
                <configuration>
                    <executable>java</executable>
                    <arguments>
                        <argument>-jar</argument>
                        <argument>target/${project.build.finalName}.jar</argument>
                    </arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.maven-compiler-plugin}</version>
                <configuration>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                    <forceJavacCompilerUse>true</forceJavacCompilerUse>
                    <source>${version.java}</source>
                    <target>${version.java}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
