<?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">
    <parent>
        <groupId>cn.quant.baa.pay</groupId>
        <artifactId>baa-pay</artifactId>
        <version>1.0.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>baa-pay-server</artifactId>
    <name>baa-pay-server</name>
    <packaging>jar</packaging>

    <profiles>
        <profile>
            <id>dev</id>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-devtools</artifactId>
                    <optional>true</optional>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
            <properties>
                <project.logging.path>./</project.logging.path>
            </properties>
        </profile>
    </profiles>

    <dependencies>

        <dependency>
            <groupId>cn.quant.baa.pay</groupId>
            <artifactId>baa-pay-core</artifactId>
            <version>1.0.0</version>
        </dependency>

        <!--quant-->
        <dependency>
            <groupId>cn.quant.spring.boot</groupId>
            <artifactId>quant-spring-boot-starter-web</artifactId>
        </dependency>

        <!--test-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.package.name}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <targetPath>${project.build.directory}/classes</targetPath>
                <includes>
                    <include>**/*.yml</include>
                    <include>**/*.xml</include>
                    <include>**/*.properties</include>
                    <include>**/*.txt</include>
                    <include>**/*.html</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/bin</directory>
                <filtering>true</filtering>
                <targetPath>${project.build.directory}/bin</targetPath>
                <includes>
                    <include>**/*.sh</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.source}</target>
                    <encoding>${maven.compiler.encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <mainClass>cn.quant.baa.pay.ServerApplication</mainClass>
                    <layout>ZIP</layout>
                </configuration>
            </plugin>
            <!--<plugin>-->
            <!--<artifactId>maven-assembly-plugin</artifactId>-->
            <!--<configuration>-->
            <!--<appendAssemblyId>false</appendAssemblyId>-->
            <!--<descriptors>-->
            <!--<descriptor>src/assembly/assembly.xml</descriptor>-->
            <!--</descriptors>-->
            <!--</configuration>-->
            <!--<executions>-->
            <!--<execution>-->
            <!--<id>make-assembly</id>-->
            <!--<phase>package</phase>-->
            <!--<goals>-->
            <!--<goal>single</goal>-->
            <!--</goals>-->
            <!--</execution>-->
            <!--</executions>-->
            <!--</plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-archetype-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <!--TODO:mybatis-->
            <!--
            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <configuration>
                    <configurationFile>src/main/resources/mybatis.cfg.xml</configurationFile>
                    <verbose>true</verbose>
                    <overwrite>true</overwrite>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>cn.quant.mybatis.generator</groupId>
                        <artifactId>quant-mybatis-generator</artifactId>
                        <version>1.3.6</version>
                    </dependency>
                </dependencies>
            </plugin>
            -->
        </plugins>
    </build>
</project>
