<?xml version="1.0" encoding="UTF-8"?>
<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>com.vortex.cloud</groupId>
    <artifactId>hw-cloud-vfs</artifactId>
    <version>1.2.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <distributionManagement>
        <repository>
            <id>releases</id>
            <name>Nexus Releases Repository</name>
            <url>http://maven.cloudhw.cn:8081/repository/releases</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <name>Nexus Snapshots Repository</name>
            <url>http://maven.cloudhw.cn:8081/repository/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>nexus</id>
            <name>Nexus Public Repository</name>
            <url>http://maven.cloudhw.cn:8081/repository/public</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>nexus</id>
            <name>Nexus Public Repository</name>
            <url>http://maven.cloudhw.cn:8081/repository/public</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <modules>
        <module>hw-cloud-vfs-cache</module>
        <module>hw-cloud-vfs-common</module>
        <module>hw-cloud-vfs-data</module>
        <module>hw-cloud-vfs-webmvc</module>
        <module>hw-cloud-vfs-config</module>
        <module>hw-cloud-vfs-bom</module>
        <module>hw-cloud-vfs-lbs</module>
    </modules>

    <properties>
        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.compilerVersion>${java.version}</maven.compiler.compilerVersion>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>

        <build.plugins.plugin.version>3.8.1</build.plugins.plugin.version>

        <spring-security.version>4.2.20.RELEASE</spring-security.version>
        <spring-cloud.version>Edgware.SR6</spring-cloud.version>
        <spring-boot.version>1.5.22.RELEASE</spring-boot.version>

        <mybatis-spring-boot-starter.version>1.3.5</mybatis-spring-boot-starter.version>
        <mybatis.version>3.5.10</mybatis.version>
        <mybatis-tk.version>3.5.3</mybatis-tk.version>
        <pagehelper.version>5.3.3</pagehelper.version>
        <hibernate.version>5.4.28.Final</hibernate.version>

        <swagger.version>1.6.2</swagger.version>
        <springfox-swagger.version>2.9.2</springfox-swagger.version>

        <snakeyaml.version>1.33</snakeyaml.version>
        <logback.version>1.2.13</logback.version>
        <xmemcached.version>2.3.1</xmemcached.version>
        <akka.version>2.5.6</akka.version>
        <ant.version>1.10.14</ant.version>
        <jxl.version>2.6.12</jxl.version>
        <json-lib.version>2.4</json-lib.version>
        <cas-client.version>3.6.4</cas-client.version>

        <vfs.version>1.2.0-SNAPSHOT</vfs.version>
        <cas.version>1.3.0-SNAPSHOT</cas.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-bom</artifactId>
                <version>${vfs.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- spring -->
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-bom</artifactId>
                <version>${spring-security.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- orm -->
            <dependency>
                <groupId>org.mybatis.spring.boot</groupId>
                <artifactId>mybatis-spring-boot-starter</artifactId>
                <version>${mybatis-spring-boot-starter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis</artifactId>
                <version>${mybatis.version}</version>
            </dependency>
            <dependency>
                <groupId>tk.mybatis</groupId>
                <artifactId>mapper</artifactId>
                <version>${mybatis-tk.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.persistence</groupId>
                        <artifactId>persistence-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.github.pagehelper</groupId>
                <artifactId>pagehelper</artifactId>
                <version>${pagehelper.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-entitymanager</artifactId>
                <version>${hibernate.version}</version>
            </dependency>

            <!--swagger-->
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>${swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-models</artifactId>
                <version>${swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-data-rest</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>

            <!--util-->
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${snakeyaml.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>com.googlecode.xmemcached</groupId>
                <artifactId>xmemcached</artifactId>
                <version>${xmemcached.version}</version>
            </dependency>
            <dependency>
                <groupId>com.typesafe.akka</groupId>
                <artifactId>akka-actor_2.11</artifactId>
                <version>${akka.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant</artifactId>
                <version>${ant.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.jexcelapi</groupId>
                <artifactId>jxl</artifactId>
                <version>${jxl.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sf.json-lib</groupId>
                <artifactId>json-lib</artifactId>
                <classifier>jdk15</classifier>
                <version>${json-lib.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jasig.cas.client</groupId>
                <artifactId>cas-client-core</artifactId>
                <version>${cas-client.version}</version>
            </dependency>

            <!-- vfs -->
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-cache</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-common-akka</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-common-disruptor</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-common-excel</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-common-kafka</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-common-utils</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-common-web</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-common-weixin</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-data-common</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-data-hibernate</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-data-mongodb</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-data-mybatis</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-data-redis</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-webmvc</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>hw-cloud-vfs-config</artifactId>
                <version>${vfs.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vortex.cloud</groupId>
                <artifactId>cas-server-ui</artifactId>
                <version>${cas.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring-boot.version}</version>
                    <configuration>
                        <excludes>
                            <exclude>
                                <groupId>org.apache.tomcat.embed</groupId>
                                <artifactId>tomcat-embed-el</artifactId>
                            </exclude>
                            <exclude>
                                <groupId>org.apache.tomcat</groupId>
                                <artifactId>tomcat-jdbc</artifactId>
                            </exclude>
                            <exclude>
                                <groupId>org.apache.tomcat</groupId>
                                <artifactId>tomcat-juli</artifactId>
                            </exclude>
                            <exclude>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                            </exclude>
                            <exclude>
                                <groupId>log4j</groupId>
                                <artifactId>log4j</artifactId>
                            </exclude>
                            <exclude>
                                <groupId>io.springfox</groupId>
                                <artifactId>springfox-swagger-ui</artifactId>
                            </exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>tongweb</id>
            <properties>
                <tongweb.version>7.0.E.6_P13</tongweb.version>
            </properties>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-tomcat</artifactId>
                        <version>${spring-boot.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-undertow</artifactId>
                        <version>${spring-boot.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-jetty</artifactId>
                        <version>${spring-boot.version}</version>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>com.tongweb.springboot</groupId>
                    <artifactId>tongweb-spring-boot-starter-1.x</artifactId>
                    <version>${tongweb.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.tongweb.springboot</groupId>
                    <artifactId>tongweb-spring-boot-websocket-1.x</artifactId>
                    <version>${tongweb.version}</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>bes</id>
            <properties>
                <bes.version>9.5.5.003</bes.version>
            </properties>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-tomcat</artifactId>
                        <version>${spring-boot.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-undertow</artifactId>
                        <version>${spring-boot.version}</version>
                        <scope>provided</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-jetty</artifactId>
                        <version>${spring-boot.version}</version>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>com.bes</groupId>
                    <artifactId>bes-lite-spring-boot-1.x-starter</artifactId>
                    <version>${bes.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.bes</groupId>
                    <artifactId>bes-websocket</artifactId>
                    <version>${bes.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>