<?xml version="1.0" encoding="UTF-8"?>
<!--
    Description: Solo POM.
    Version: 3.18.3.53, Mar 26, 2019
    Author: <a href="http://88250.b3log.org">Liang Ding</a>
    Author: <a href="http://www.annpeter.cn">Ann Peter</a>
    Author: <a href="http://vanessa.b3log.org">Vanessa</a>
    Author: <a href="https://github.com/nanolikeyou">nanolikeyou</a>
    Author: <a href="https://github.com/hzchendou">hzchendou</a>
-->
<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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.b3log</groupId>
    <artifactId>solo</artifactId>
    <packaging>war</packaging>
    <name>Solo</name>
    <version>3.4.0</version>
    <description>
        一款小而美的博客系统，专为程序员设计。
    </description>
    <inceptionYear>2010</inceptionYear>

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

    <licenses>
        <license>
            <name>GNU Affero General Public License, Version 3</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>d@b3log.org</id>
            <name>Liang Ding</name>
            <email>d@b3log.org</email>
            <url>http://88250.b3log.org</url>
            <roles>
                <role>Lead</role>
                <role>Initial Committer</role>
            </roles>
            <organization>B3log</organization>
            <organizationUrl>https://b3log.org</organizationUrl>
            <timezone>+8</timezone>
        </developer>

        <developer>
            <id>v@b3log.org</id>
            <name>Liyuan Li</name>
            <email>v@b3log.org</email>
            <url>http://vanessa.b3log.org</url>
            <roles>
                <role>Committer</role>
            </roles>
            <organization>B3log</organization>
            <organizationUrl>https://b3log.org</organizationUrl>
            <timezone>+8</timezone>
        </developer>

    </developers>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/b3log/solo/issues</url>
    </issueManagement>

    <scm>
        <url>https://github.com/b3log/solo</url>
    </scm>

    <properties>
        <org.b3log.latke.version>2.4.47</org.b3log.latke.version>

        <slf4j.version>1.7.5</slf4j.version>
        <jsoup.version>1.9.1</jsoup.version>
        <flexmark.version>0.40.20</flexmark.version>
        <jetty.version>9.4.12.v20180830</jetty.version>
        <commons-cli.version>1.3.1</commons-cli.version>
        <commons-codec.version>1.10</commons-codec.version>
        <emoji-java.version>4.0.0</emoji-java.version>
        <jodd.version>5.0.3</jodd.version>
        <owasp.version>1.2.2</owasp.version>
        <snakeyaml.version>1.18</snakeyaml.version>
        <freemarker.version>2.3.28</freemarker.version>
        <user-agent-utils.version>1.21</user-agent-utils.version>
        <servlet.version>3.1.0</servlet.version>

        <license-maven-plugin.version>3.0</license-maven-plugin.version>
        <maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
        <maven-war-plugin.version>3.2.2</maven-war-plugin.version>
        <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
        <jacoco-maven-plugin.version>0.8.2</jacoco-maven-plugin.version>
        <testng.version>6.1.1</testng.version>
        <mysql-connector-java.version>8.0.12</mysql-connector-java.version>

        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.b3log</groupId>
            <artifactId>latke-core</artifactId>
            <version>${org.b3log.latke.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>${servlet.version}</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql-connector-java.version}</version>
        </dependency>

        <dependency>
            <groupId>org.b3log</groupId>
            <artifactId>latke-repository-mysql</artifactId>
            <version>${org.b3log.latke.version}</version>
        </dependency>

        <dependency>
            <groupId>org.b3log</groupId>
            <artifactId>latke-repository-h2</artifactId>
            <version>${org.b3log.latke.version}</version>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>${jsoup.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>com.vladsch.flexmark</groupId>
            <artifactId>flexmark-all</artifactId>
            <version>${flexmark.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.vladsch.flexmark</groupId>
                    <artifactId>flexmark-pdf-converter</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.vladsch.flexmark</groupId>
                    <artifactId>flexmark-youtrack-converter</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.vladsch.flexmark</groupId>
                    <artifactId>flexmark-jira-converter</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.vdurmont</groupId>
            <artifactId>emoji-java</artifactId>
            <version>${emoji-java.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.json</groupId>
                    <artifactId>json</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>${commons-cli.version}</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>${jetty.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jodd</groupId>
            <artifactId>jodd-http</artifactId>
            <version>${jodd.version}</version>
        </dependency>

        <dependency>
            <groupId>org.owasp.encoder</groupId>
            <artifactId>encoder</artifactId>
            <version>${owasp.version}</version>
        </dependency>

        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>${snakeyaml.version}</version>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commons-codec.version}</version>
        </dependency>

        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>${freemarker.version}</version>
        </dependency>

        <dependency>
            <groupId>eu.bitwalker</groupId>
            <artifactId>UserAgentUtils</artifactId>
            <version>${user-agent-utils.version}</version>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>etc/</exclude>
                    <exclude>lib/</exclude>
                    <exclude>docker/</exclude>
                </excludes>
            </resource>
        </resources>

        <testResources>
            <testResource>
                <directory>src/main/webapp</directory>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>${coveralls-maven-plugin.version}</version>
                <configuration>
                    <repoToken>PmmgdTzVuYQAsiOHNZ67bNDuqwDRSKvlm</repoToken>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license-maven-plugin.version}</version>
                <configuration>
                    <header>src/main/resources/etc/header.txt</header>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <strictCheck>true</strictCheck>
                    <includes>
                        <include>**/src/*/java/**/*.java</include>
                        <include>**/src/*/webapp/js/*.js</include>
                        <include>**/src/*/webapp/**/*.ftl</include>
                        <include>**/src/*/webapp/skins/*/js/*.js</include>
                        <include>**/src/*/webapp/skins/*/css/*.scss</include>
                        <include>**/src/*/webapp/skins/**/*.properties</include>
                        <include>**/src/*/webapp/plugins/*/js/*.js</include>
                        <include>**/src/*/webapp/plugins/*/css/*.css</include>
                        <include>**/src/*/webapp/plugins/*/*.properties</include>
                        <include>**/src/*/webapp/js/admin/*.js</include>
                        <include>**/src/*/resources/*.properties</include>
                        <include>**/src/*/webapp/WEB-INF/*.xml</include>
                        <include>**/src/test/resources/**/*</include>
                        <include>**/src/*/resources/docker/*</include>
                    </includes>
                    <excludes>
                        <exclude>**/src/main/java/**/package-info.java</exclude>
                        <exclude>**/src/*/webapp/js/lib/*.js</exclude>
                        <include>**/src/*/webapp/js/*.min.js</include>
                        <include>**/src/*/webapp/js/admin/*.min.js</include>
                        <include>**/src/*/webapp/skins/*/js/*.min.js</include>
                        <include>**/src/*/webapp/skins/*/css/*.css</include>
                        <exclude>**/src/main/java/com/**/*.java</exclude>
                    </excludes>

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

            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty.version}</version>
                <configuration>
                    <httpConnector>
                        <port>8080</port>
                    </httpConnector>
                    <stopKey>stop</stopKey>
                    <stopPort>4501</stopPort>
                    <webAppConfig>
                        <contextPath>/</contextPath>
                    </webAppConfig>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven-war-plugin.version}</version>
            </plugin>

        </plugins>

        <finalName>solo</finalName>
    </build>

    <profiles>
        <profile>
            <id>ci</id>
        </profile>

        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>aliyun</id>
                    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
                </repository>
            </repositories>

            <pluginRepositories>
                <pluginRepository>
                    <id>aliyun</id>
                    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

</project>

