<?xml version="1.0" encoding="UTF-8"?>
<!--
    Description: Latke parent POM.
    Version: 1.2.2.20, Aug 1, 2018
    Author: Liang Ding
-->
<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>org.b3log</groupId>
    <artifactId>latke-parent</artifactId>
    <version>2.4.8</version>
    <packaging>pom</packaging>
    <name>Latke Parent</name>
    <url>https://github.com/b3log/latke</url>
    <description>Yet another simple web framework based on Java servlet technology.</description>
    <inceptionYear>2009</inceptionYear>

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

    <modules>
        <module>latke</module>
        <module>latke-repository-h2</module>
        <module>latke-repository-mysql</module>
        <module>latke-repository-sqlserver</module>
        <module>latke-repository-oracle</module>
    </modules>

    <organization>
        <name>B3log</name>
        <url>https://b3log.org</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <properties>
        <servlet.version>3.1.0</servlet.version>
        <el-api.version>1.0</el-api.version>
        <freemarker.version>2.3.28</freemarker.version>
        <javax.mail.version>1.4.7</javax.mail.version>
        <commons-io.version>2.6</commons-io.version>
        <commons-lang.version>2.6</commons-lang.version>
        <commons-codec.version>1.11</commons-codec.version>
        <javassist.version>3.21.0-GA</javassist.version>
        <slf4j.version>1.7.7</slf4j.version>

        <!-- Maven Plugin -->
        <maven-license-plugin.version>1.9.0</maven-license-plugin.version>
        <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
        <maven-cobertura-plugin.version>2.5.1</maven-cobertura-plugin.version>
        <!-- Unit Test -->
        <testng.version>6.1.1</testng.version>
        <!-- JDBC Drivers -->
        <mysql-connector-java.version>5.1.18</mysql-connector-java.version>
        <!-- JDBC Connection Pool -->
        <h2.version>1.4.190</h2.version>
        <druid.version>1.0.29</druid.version>
        <!-- Redis -->
        <jedis.version>2.9.0</jedis.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <JDK.version>1.8</JDK.version>
    </properties>

    <scm>
        <connection>scm:git:git@github.com:b3log/latke.git</connection>
        <developerConnection>scm:git:git@github.com:b3log/latke.git</developerConnection>
        <url>git@github.com:b3log/latke.git</url>
        <tag>latke-parent-2.4.8</tag>
    </scm>

    <issueManagement>
        <system>Github Issues</system>
        <url>https://github.com/b3log/latke/issues</url>
    </issueManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>${JDK.version}</source>
                    <target>${JDK.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>${maven-license-plugin.version}</version>
                <configuration>
                    <basedir>${basedir}</basedir>
                    <header>src/main/resources/etc/header.txt</header>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <strictCheck>true</strictCheck>
                    <includes>
                        <include>**/src/main/java/**/*.java</include>
                        <include>**/src/test/java/**/*.java</include>
                        <include>**/src/main/resources/*.properties</include>
                        <include>**/src/test/resources/*.properties</include>
                    </includes>
                    <excludes>
                        <exclude>**/src/main/java/**/package-info.java</exclude>
                        <exclude>**/src/main/java/org/json/*.java</exclude>
                        <exclude>**/src/main/java/org/weborganic/furi/*.java</exclude>
                        <exclude>**/src/main/java/org/b3log/latke/util/AntPathMatcher.java</exclude>
                        <exclude>**/src/main/java/javax/**/*.java</exclude>
                    </excludes>

                    <useDefaultExcludes>true</useDefaultExcludes>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <useDefaultMapping>true</useDefaultMapping>
                    <properties>
                        <year>2009-2018</year>
                        <devTeam>b3log.org &amp; hacpai.com</devTeam>
                    </properties>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- For source code style check -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <configuration>
                    <configLocation>src/main/resources/etc/beyondtrack_checks.xml</configLocation>
                    <includeTestSourceDirectory>false</includeTestSourceDirectory>
                    <excludes>
                        org/json/*.java,
                        org/weborganic/furi/*.java,
                        org/b3log/latke/util/AntPathMatcher.java,
                        javax/**/*.java,
                        org/b3log/latke/ioc/**/*.java,
                        org/b3log/latke/util/Reflections.java,
                        org/b3log/latke/util/Execs.java,
                        org/b3log/latke/util/Crypts.java,
                        org/b3log/latke/util/Times.java,
                        org/b3log/latke/util/TimeZones.java
                    </excludes>
                    <consoleOutput>true</consoleOutput>
                    <failOnViolation>true</failOnViolation>
                    <failsOnError>true</failsOnError>
                    <encoding>UTF-8</encoding>
                    <!-- Do NOT skip code style check before committing -->
                    <skip>false</skip>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <skipTests>false</skipTests>
                    <parallel>methods</parallel>
                    <threadCount>20</threadCount>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>
                                jar
                            </goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <show>private</show>
                    <failOnError>false</failOnError>
                    <excludePackageNames>org.json.*,org.weborganic.*</excludePackageNames>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${maven-cobertura-plugin.version}</version>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>linux</id>
            <activation>
                <os>
                    <family>linux</family>
                </os>
            </activation>
            <properties>
                <jacobeExecutable>
                    src/main/resources/etc/jacobe/linux/jacobe
                </jacobeExecutable>
            </properties>
        </profile>
        <profile>
            <id>windows</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
            </activation>
            <properties>
                <jacobeExecutable>
                    src/main/resources/etc/jacobe/win32/jacobe.exe
                </jacobeExecutable>
            </properties>
        </profile>
    </profiles>
</project>
