<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>StoreCloud-store</artifactId>
        <groupId>com.shinsoft</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <groupId>com.shinsoft</groupId>
    <artifactId>sto</artifactId>
    <version>1.0.0</version>
    <name>sto</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>17</java.version>
    </properties>


    <dependencies>
        <!--spring-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-validator</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!--log4j2-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-jul</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
        </dependency>
        <!--log4j2-->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-amqp</artifactId>
        </dependency>
        <!--spring-->


        <!--common-->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-dbutils</groupId>
            <artifactId>commons-dbutils</artifactId>
        </dependency>
        <!--common-->


        <!--数据库相关-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

        <dependency>
            <groupId>com.oracle.database.jdbc</groupId>
            <artifactId>ojdbc8</artifactId>
        </dependency>

        <dependency>
            <groupId>com.oracle.database.nls</groupId>
            <artifactId>orai18n</artifactId>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
        </dependency>

        <!--数据库相关-->


        <!--代码生成-->
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
        </dependency>

        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-generator</artifactId>
        </dependency>

        <!--        <dependency>-->
        <!--            <groupId>com.baomidou</groupId>-->
        <!--            <artifactId>mybatis-plus-extension</artifactId>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>

        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
        </dependency>
        <!--代码生成-->


        <!--JSON相关-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>

        <!--JSON相关-->

        <!--加密-->
        <dependency>
            <groupId>com.auth0</groupId>
            <artifactId>java-jwt</artifactId>
        </dependency>
        <!--加密-->

        <!--二维码-->
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>javase</artifactId>
        </dependency>
        <!--二维码-->


        <!--POI office文档控制jar-->
<!--        <dependency>-->
<!--            <groupId>org.apache.poi</groupId>-->
<!--            <artifactId>poi</artifactId>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>org.apache.poi</groupId>-->
<!--            <artifactId>poi-scratchpad</artifactId>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>org.apache.poi</groupId>-->
<!--            <artifactId>poi-ooxml</artifactId>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>fr.opensagres.xdocreport</groupId>-->
<!--            <artifactId>xdocreport</artifactId>-->
<!--        </dependency>-->

<!--        <dependency>-->
<!--            <groupId>fr.opensagres.xdocreport</groupId>-->
<!--            <artifactId>fr.opensagres.poi.xwpf.converter.core</artifactId>-->
<!--        </dependency>-->

<!--        <dependency>-->
<!--            <groupId>fr.opensagres.xdocreport</groupId>-->
<!--            <artifactId>fr.opensagres.poi.xwpf.converter.xhtml</artifactId>-->
<!--        </dependency>-->

<!--        <dependency>-->
<!--            <groupId>org.apache.poi</groupId>-->
<!--            <artifactId>poi-ooxml-schemas</artifactId>-->
<!--        </dependency>-->

<!--        <dependency>-->
<!--            <groupId>org.apache.poi</groupId>-->
<!--            <artifactId>ooxml-schemas</artifactId>-->
<!--        </dependency>-->
        <!--POI office文档控制jar-->

        <!--Excel导入导出-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>easyexcel</artifactId>
        </dependency>
        <!--Excel导入导出-->
        <!--  itext-->
        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
        </dependency>
        <!--itext-->


        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
        </dependency>


        <!-- 公共方法和接口-->
        <dependency>
            <groupId>com.shinsoft</groupId>
            <artifactId>tools</artifactId>
            <version>1.0.1</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/../lib/tools-1.0.1.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>com.shinsoft</groupId>
            <artifactId>generator</artifactId>
            <version>1.0.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/../lib/generator-1.0.0.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>com.shinsoft</groupId>
            <artifactId>framework-api</artifactId>
            <version>1.0.1</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/../lib/framework-api-1.0.1.jar</systemPath>
        </dependency>

<!--        <dependency>-->
<!--            <groupId>com.shinsoft</groupId>-->
<!--            <artifactId>sal-api</artifactId>-->
<!--            <version>1.0.0</version>-->
<!--            <scope>system</scope>-->
<!--            <systemPath>${project.basedir}/../lib/sal-api-1.0.0.jar</systemPath>-->
<!--        </dependency>-->

        <!-- 公共方法和接口-->
    </dependencies>


    <profiles>

        <profile> <!-- 本地开发环境 -->
            <id>localhost</id>
            <properties>
                <profiles.active>localhost</profiles.active>
            </properties>
        </profile>
        <profile> <!-- 服务器开发环境 -->
            <id>develop</id>
            <properties>
                <profiles.active>develop</profiles.active>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile> <!-- 测试环境 -->
            <id>test</id>
            <properties>
                <profiles.active>test</profiles.active>
            </properties>
        </profile>
        <profile> <!-- 生产环境 -->
            <id>production</id>
            <properties>
                <profiles.active>production</profiles.active>
            </properties>
        </profile>

        <profile> <!-- 个人 -->
            <id>litai</id>
            <properties>
                <profiles.active>litai</profiles.active>
            </properties>
        </profile>

        <profile> <!-- 个人 -->
        <id>zhangqy</id>
        <properties>
            <profiles.active>zhangqy</profiles.active>
        </properties>
    </profile>

        <profile> <!-- 个人 -->
            <id>moxincui</id>
            <properties>
                <profiles.active>moxincui</profiles.active>
            </properties>
        </profile>

        <profile> <!-- 个人 -->
            <id>huangluya</id>
            <properties>
                <profiles.active>huangluya</profiles.active>
            </properties>
        </profile>
        <profile> <!-- 个人 -->
            <id>xiechongjian</id>
            <properties>
                <profiles.active>xiechongjian</profiles.active>
            </properties>
        </profile>

        <profile> <!-- 个人 -->
            <id>zhenghao</id>
            <properties>
                <profiles.active>zhenghao</profiles.active>
            </properties>
        </profile>
        <profile> <!-- 个人 -->
            <id>zhaochenhao</id>
            <properties>
                <profiles.active>zhaochenhao</profiles.active>
            </properties>
        </profile>
        <profile> <!-- 个人 -->
            <id>hubeikuan</id>
            <properties>
                <profiles.active>hubeikuan</profiles.active>
            </properties>
        </profile>
        <profile> <!-- 个人 -->
            <id>niushixue</id>
            <properties>
                <profiles.active>niushixue</profiles.active>
            </properties>
        </profile>
    </profiles>


    <build>

        <finalName>${project.artifactId}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <!--                <excludes>-->
                <!--                    <exclude>localhost/**</exclude>-->
                <!--                    <exclude>develop/**</exclude>-->
                <!--                    <exclude>production/**</exclude>-->
                <!--                    <exclude>classes/**</exclude>-->
                <!--                    <exclude>lib/**</exclude>-->
                <!--                </excludes>-->
            </resource>
            <resource>
                <directory>src/main/resources/${profiles.active}</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.yml</include>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <targetPath>${project.build.directory}/classes/mapper</targetPath>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.shinsoft.sto.StoApplication</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>lib/tools-1.0.1.jar lib/generator-1.0.0.jar lib/framework-api-1.0.1.jar
                            </Class-Path>
                        </manifestEntries>
                    </archive>
                    <outputDirectory>
                        ${project.build.directory}
                    </outputDirectory>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${project.build.directory}/lib
                            </outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>sys</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>system</includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resource</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${project.build.directory}
                            </outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.basedir}/src/main/resources/${profiles.active}</directory>
                                    <includes>
                                        <include>Dockerfile</include>
                                        <include>bootstrap.properties</include>
                                        <include>run.sh</include>
                                        <include>simhei.ttf</include>
                                        <include>simsun.ttf</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


        </plugins>

    </build>

</project>

