<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>net.jrouter</groupId>
        <artifactId>j-parent</artifactId>
        <version>1.3</version>
    </parent>
    <artifactId>jrouter-servlet</artifactId>
    <packaging>jar</packaging>
    <version>1.8.3</version>
    <name>JRouter-servlet</name>
    <url>https://github.com/tripluo/jrouter-servlet</url>
    <dependencies>
        <!-- jrouter -->
        <dependency>
            <groupId>net.jrouter</groupId>
            <artifactId>jrouter</artifactId>
            <version>1.8.3</version>
        </dependency>
        <!-- logback -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- springframework integration -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <exclusions>
                <!--
                <exclusion>
                    <artifactId>commons-logging</artifactId>
                    <groupId>commons-logging</groupId>
                </exclusion>
                -->
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- netty http -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec-http2</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- servlet/jsp -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- testng -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- spring test -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <!-- jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>checkstyle</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- checkstyle -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>3.1.0</version>
                        <configuration>
                            <configLocation>${checkstyle.config.file}</configLocation>
                            <failOnViolation>false</failOnViolation>
                            <failsOnError>false</failsOnError>
                            <includeTestSourceDirectory>false</includeTestSourceDirectory>
                            <logViolationsToConsole>true</logViolationsToConsole>
                            <violationSeverity>warning</violationSeverity>
                        </configuration>
                        <executions>
                            <execution>
                                <id>checkstyle</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>pmd</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- pmd -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-pmd-plugin</artifactId>
                        <version>3.13.0</version>
                        <dependencies>
                            <dependency>
                                <groupId>net.sourceforge.pmd</groupId>
                                <artifactId>pmd-core</artifactId>
                                <version>6.23.0</version>
                            </dependency>
                            <dependency>
                                <groupId>net.sourceforge.pmd</groupId>
                                <artifactId>pmd-java</artifactId>
                                <version>6.23.0</version>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                    <goal>cpd-check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <linkXRef>false</linkXRef>
                            <!-- pmd代码校验并打印错误 -Dpmd.skip=true -->
                            <failOnViolation>false</failOnViolation>
                            <printFailingErrors>true</printFailingErrors>
                            <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                            <rulesets>
                                <ruleset>${pmd.rule.file}</ruleset>
                            </rulesets>
                            <excludes>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <configuration>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- gpg -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <repository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <checkstyle.config.file></checkstyle.config.file>
        <pmd.rule.file></pmd.rule.file>
    </properties>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:git@github.com:tripluo/jrouter-servlet.git</connection>
        <developerConnection>scm:git:git@github.com:tripluo/jrouter-servlet.git</developerConnection>
        <url>https://github.com/tripluo/jrouter-servlet</url>
    </scm>
    <developers>
        <developer>
            <id>tripluo</id>
            <name>Luo Li</name>
            <email>sunjumper@163.com</email>
        </developer>
    </developers>
    <description>jrouter for http request mapping also adapted servlet.</description>
</project>