<?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.zyd</groupId>
    <artifactId>blog</artifactId>
    <version>2.2.5</version>
    <packaging>pom</packaging>
    <modules>
        <module>blog-core</module>
        <module>blog-web</module>
        <module>blog-admin</module>
        <module>blog-file</module>
    </modules>

    <name>blog</name>
    <description>OneBlog是一款简洁美观、自适应的Java博客系统</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.8.RELEASE</version>
        <relativePath/>
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <maven.test.skip>true</maven.test.skip>
        <webmagic.version>0.7.3</webmagic.version>
        <jsoup.version>1.10.2</jsoup.version>
        <javax.validation.version>2.0.1.Final</javax.validation.version>
        <hibernate.validator.version>6.0.9.Final</hibernate.validator.version>
        <tomcat.version>8.5.57</tomcat.version>
        <excel4j.version>2.1.4-Final</excel4j.version>
        <mybatis.version>1.3.2</mybatis.version>
        <mapper.version>2.1.0</mapper.version>
        <pagehelper.version>1.2.3</pagehelper.version>
        <druid.version>1.1.10</druid.version>
        <fastjson.version>1.2.76</fastjson.version>
        <shiro.spring.version>1.7.1</shiro.spring.version>
        <shiro.redis.version>2.4.2.1-RELEASE</shiro.redis.version>
        <shiro.freemarker.tags.version>0.1</shiro.freemarker.tags.version>
        <qiniu.version>7.5.0</qiniu.version>
        <useragentutils.version>1.20</useragentutils.version>
        <braum.version>1.0.0-alpha</braum.version>
        <hutool.version>5.5.7</hutool.version>
        <spring.web.version>5.1.4.RELEASE</spring.web.version>
        <aliyun.oss.version>2.8.3</aliyun.oss.version>
        <blog-hunter.version>1.0.4</blog-hunter.version>
        <jap.version>1.0.2</jap.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.zyd</groupId>
                <artifactId>blog-core</artifactId>
                <version>2.2.5</version>
            </dependency>
            <dependency>
                <groupId>com.zyd</groupId>
                <artifactId>blog-admin</artifactId>
                <version>2.2.5</version>
            </dependency>
            <dependency>
                <groupId>com.zyd</groupId>
                <artifactId>blog-web</artifactId>
                <version>2.2.5</version>
            </dependency>
            <dependency>
                <groupId>com.zyd</groupId>
                <artifactId>blog-file</artifactId>
                <version>2.2.5</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.20</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-core</artifactId>
            <version>${hutool.version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <!-- Maven控制Spring Profile -->
    <profiles>
        <!--默认开启dev-->
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <profileActive>dev</profileActive>
            </properties>
            <build>
                <!-- 产生的构件的文件名，默认值是${artifactId}-${version}-->
                <finalName>${project.artifactId}</finalName>
            </build>
        </profile>
        <!--生产配置-->
        <profile>
            <id>prod</id>
            <properties>
                <profileActive>prod</profileActive>
            </properties>
            <build>
                <!-- 产生的构件的文件名-->
                <finalName>${project.artifactId}</finalName>
            </build>
        </profile>
    </profiles>

    <build>
        <!-- profile对资源的操作 -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>application*.yml</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <!-- 是否替换@xx@表示的maven properties属性值 -->
                <filtering>true</filtering>
                <includes>
                    <include>application.yml</include>
                    <include>application-${profileActive}.yml</include>
                </includes>
            </resource>
        </resources>
    </build>

    <repositories>
        <repository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/snapshot</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/snapshot</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</project>
