<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!--http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies-->

<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">
    <groupId>com.sparrowzoo</groupId>
    <version>0.0.1</version>
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <!-- (bill of materials)-->
    <artifactId>sparrow-bom</artifactId>

    <name>sparrow-bom</name>
    <url>https://github.com/sparrowzoo/sparrow-bom.git</url>
    <description>sparrow-bom</description>
    <properties>
        <sparrow_version>1.0.0-SNAPSHOT</sparrow_version>
        <sparrow_loader_version>1.0.0-SNAPSHOT</sparrow_loader_version>
        <sparrow_json_version>1.0.0-SNAPSHOT</sparrow_json_version>
        <sparrow_orm_version>1.0.0-SNAPSHOT</sparrow_orm_version>
        <sparrow_mvc_version>1.0.0-SNAPSHOT</sparrow_mvc_version>
        <sparrow_data_source_version>1.0.0-SNAPSHOT</sparrow_data_source_version>
        <sparrow_container_version>1.0.0-SNAPSHOT</sparrow_container_version>
        <sparrow_jedis_version>1.0.0-SNAPSHOT</sparrow_jedis_version>
        <sparrow_log_version>1.0.0-SNAPSHOT</sparrow_log_version>
        <sparrow_rocketmq_client_version>1.0.0-SNAPSHOT</sparrow_rocketmq_client_version>
        <sparrow_kafka_client_version>1.0.0-SNAPSHOT</sparrow_kafka_client_version>
        <sparrow_redis_client_version>1.0.0-SNAPSHOT</sparrow_redis_client_version>
        <sparrow_aop_version>1.0.0-SNAPSHOT</sparrow_aop_version>
        <sparrow_distribution_job_version>1.0.0-SNAPSHOT</sparrow_distribution_job_version>
        <sparrow_distribution_config_version>1.0.0-SNAPSHOT</sparrow_distribution_config_version>
        <sparrow_markdown_version>1.0.0-SNAPSHOT</sparrow_markdown_version>
        <sparrow_registry_version>1.0.0-SNAPSHOT</sparrow_registry_version>
        <sparrow_protocol_version>1.0.0-SNAPSHOT</sparrow_protocol_version>
        <sparrow_protocol_dao_version>1.0.0-SNAPSHOT</sparrow_protocol_dao_version>
        <sparrow_protocol_mq_version>1.0.0-SNAPSHOT</sparrow_protocol_mq_version>
        <sparrow_protocol_redis_version>1.0.0-SNAPSHOT</sparrow_protocol_redis_version>

        <sparrow_lettuce_cluster_version>1.0.0-SNAPSHOT-SNAPSHOT</sparrow_lettuce_cluster_version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- Build Environment -->
        <maven.compile.source>1.8</maven.compile.source>
        <maven.compile.target>1.8</maven.compile.target>
        <maven.compile.version>3.1</maven.compile.version>
        <maven.compile.encoding>UTF-8</maven.compile.encoding>
        <javax.jsp.api.version>2.2</javax.jsp.api.version>
        <javax.cdi.api.version>1.2</javax.cdi.api.version>
        <javax.mail.version>1.4.7</javax.mail.version>
        <javax.jstl.version>1.2</javax.jstl.version>
        <javax.servlet_api_version>3.0.1</javax.servlet_api_version>
        <javax.persistence.version>1.0</javax.persistence.version>
        <mysql.version>8.0.29</mysql.version>
        <tomcat.version>7.0.73</tomcat.version>
        <tomcat.plugin.version>2.2</tomcat.plugin.version>
        <jna.version>5.3.1</jna.version>
        <yaml.version>1.26</yaml.version>
        <logback.version>1.2.9</logback.version>
    </properties>
    <developers>
        <developer>
            <id>harry</id>
            <name>sparrowzoo@163.com</name>
            <email>sparrowzoo@163.com</email>
            <roles>
                <role>Project Manager</role>
                <role>Architect</role>
            </roles>
            <organization>sparrowzoo</organization>
            <organizationUrl>http://www.sparrowzoo.com</organizationUrl>
            <timezone>+8</timezone>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/sparrowzoo/sparrow-bom.git</url>
        <connection>https://github.com/sparrowzoo/sparrow-bom.git</connection>
        <developerConnection>https://github.com/sparrowzoo/sparrow-bom.git</developerConnection>
    </scm>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
                <version>${javax.mail.version}</version>
            </dependency>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-pool</groupId>
                <artifactId>commons-pool</artifactId>
                <version>1.5.5</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.12</version>
            </dependency>
            <dependency>
                <groupId>javax.persistence</groupId>
                <artifactId>persistence-api</artifactId>
                <version>${javax.persistence.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${javax.servlet_api_version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>${javax.jsp.api.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jstl</groupId>
                <artifactId>jstl</artifactId>
                <version>${javax.jstl.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow</artifactId>
                <version>${sparrow_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-aop</artifactId>
                <version>${sparrow_aop_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-container</artifactId>
                <version>${sparrow_container_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-data-source</artifactId>
                <version>${sparrow_data_source_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-json</artifactId>
                <version>${sparrow_json_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-loader</artifactId>
                <version>${sparrow_loader_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-log</artifactId>
                <version>${sparrow_log_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-orm</artifactId>
                <version>${sparrow_orm_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-mvc</artifactId>
                <version>${sparrow_mvc_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-registry</artifactId>
                <version>${sparrow_registry_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-markdown</artifactId>
                <version>${sparrow_markdown_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-rocketmq-client</artifactId>
                <version>${sparrow_rocketmq_client_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-jedis</artifactId>
                <version>${sparrow_jedis_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-jedis-cluster</artifactId>
                <version>${sparrow_jedis_version}</version>
            </dependency>

            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-protocol</artifactId>
                <version>${sparrow_protocol_version}</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-protocol-dao</artifactId>
                <version>${sparrow_protocol_dao_version}</version>
            </dependency>

            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-protocol-mq</artifactId>
                <version>${sparrow_protocol_mq_version}</version>
            </dependency>

            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-protocol-redis</artifactId>
                <version>${sparrow_protocol_redis_version}</version>
            </dependency>
            <dependency>
                <groupId>org.elasticsearch</groupId>
                <artifactId>elasticsearch-analysis-ik</artifactId>
                <version>6.1.1</version>
            </dependency>

            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>${jna.version}</version>
            </dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${yaml.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-pool2</artifactId>
                <version>2.4.3</version>
            </dependency>
            <dependency>
                <groupId>com.sparrow</groupId>
                <artifactId>sparrow-lettuce-cluster</artifactId>
                <version>${sparrow_lettuce_cluster_version}</version>
            </dependency>
            <dependency>
                <groupId>com.esotericsoftware.kryo</groupId>
                <artifactId>kryo</artifactId>
                <version>2.24.0</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <profiles>
        <!--注意,此id必须与setting.xml中指定的一致,不要自作聪明改它名字-->
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>true</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <configuration>
                            <!-- jdk1.8要加上，1.7要去掉，否则会报错 -->
                            <additionalJOptions>
                                <additionalJOption>-Xdoclint:none</additionalJOption>
                            </additionalJOptions>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <build>
        <pluginManagement>
            <plugins>
                <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-checkstyle-plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.2</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.44</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                        <includeTestSourceDirectory>false</includeTestSourceDirectory>
                    </configuration>
                    <executions>
                        <execution>
                            <id>checkstyle</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compile.version}</version>
                    <configuration>
                        <source>${maven.compile.source}</source>
                        <target>${maven.compile.target}</target>
                        <encoding>${maven.compile.encoding}</encoding>
                        <debug>true</debug>
                    </configuration>
                </plugin>
                <!--JDK 要用 6或 7 tomcat 8的插件会报错-->
                <!--org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException-->
                <!--TOMCAT 8 配置方法 http://blog.csdn.net/u011781521/article/details/75194071-->

                <!--https://stackoverflow.com/questions/9260555/tomcat-7-in-eclipse-indigo-javax-naming-namenotfoundexception-resource-web-in/9261392#9261392-->
                <!--https://relentlesscoding.com/2018/04/24/tomcat7-maven-plugin-invalid-byte-tag-in-constant-pool-19/-->

                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>${tomcat.plugin.version}</version>
                    <configuration>
                        <path>/</path>
                        <port>7777</port>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.tomcat.embed</groupId>
                            <artifactId>tomcat-embed-core</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-util</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-coyote</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-api</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-jdbc</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-dbcp</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-servlet-api</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-jsp-api</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-jasper</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-jasper-el</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-el-api</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-catalina</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-tribes</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-catalina-ha</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-annotations-api</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-juli</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat.embed</groupId>
                            <artifactId>tomcat-embed-logging-juli</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.tomcat.embed</groupId>
                            <artifactId>tomcat-embed-logging-log4j</artifactId>
                            <version>${tomcat.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.10</version>
                    <configuration>
                        <testFailureIgnore>true</testFailureIgnore>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                    <configuration>
                        <rules>
                            <DependencyConvergence/>
                        </rules>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>
    </build>
</project>