<?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>
        <artifactId>novel</artifactId>
        <groupId>com.java2nb</groupId>
        <version>4.3.0-RC1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>novel-front</artifactId>

    <name>novel-front</name>
    <description>小说精品屋 前台</description>

    <dependencies>
        <dependency>
            <groupId>com.java2nb</groupId>
            <artifactId>novel-common</artifactId>
        </dependency>

        <!--JWT(Json Web Token)登录支持-->
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>${jjwt.version}</version>
        </dependency>

        <!--aliyunOSS-->
        <dependency>
            <groupId>com.aliyun.oss</groupId>
            <artifactId>aliyun-sdk-oss</artifactId>
            <version>${aliyun-sdk-oss.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>${commons-fileupload.version}</version>
        </dependency>

        <dependency>
            <groupId>com.alipay.sdk</groupId>
            <artifactId>alipay-sdk-java</artifactId>
            <version>${alipay-sdk-java.version}</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <!-- 文件夹 -->
                                <copy todir="${project.build.directory}/build/config" overwrite="true">
                                    <fileset dir="${basedir}/src/main/build/config">
                                        <include name="*.*"/>
                                    </fileset>
                                    <fileset dir="${basedir}/src/main/resources">
                                        <include name="application-alipay.yml"/>
                                        <include name="application-website.yml"/>
                                    </fileset>
                                </copy>
                                <copy todir="${project.build.directory}/build/templates" overwrite="true">
                                    <fileset dir="${basedir}/../templates">
                                        <include name="**/*.*"/>
                                    </fileset>
                                </copy>
                                <copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
                                      tofile="${project.build.directory}/build/${project.artifactId}.jar"/>

                                <fixcrlf srcdir="${basedir}/src/main/build/scripts" eol="unix"/>
                                <copy todir="${project.build.directory}/build/bin">
                                    <fileset dir="${basedir}/src/main/build/scripts">
                                        <include name="*.sh"/>
                                        <include name="*.txt"/>
                                        <include name="*.bat"/>
                                    </fileset>
                                </copy>
                                <zip destfile='${project.build.directory}/build/${project.artifactId}.zip'>
                                    <zipfileset filemode="755" dir='${project.build.directory}/build/'/>
                                </zip>

                                <copy file="${basedir}/src/main/build/docker/Dockerfile"
                                      tofile="${project.build.directory}/build/Dockerfile"/>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <!--    <build>-->
    <!--        <plugins>-->
    <!--            &lt;!&ndash; 将相同groupId的依赖模块打包进来 &ndash;&gt;-->
    <!--            <plugin>-->
    <!--                <groupId>org.apache.maven.plugins</groupId>-->
    <!--                <artifactId>maven-shade-plugin</artifactId>-->
    <!--                <configuration>-->
    <!--                    <createDependencyReducedPom>false</createDependencyReducedPom>-->
    <!--                </configuration>-->
    <!--                <executions>-->
    <!--                    <execution>-->
    <!--                        <phase>package</phase>-->
    <!--                        <goals>-->
    <!--                            <goal>shade</goal>-->
    <!--                        </goals>-->
    <!--                        <configuration>-->
    <!--                            <artifactSet>-->
    <!--                                <includes>-->
    <!--                                    <include>${project.groupId}:*:*</include>-->
    <!--                                </includes>-->
    <!--                            </artifactSet>-->
    <!--                        </configuration>-->
    <!--                    </execution>-->
    <!--                </executions>-->
    <!--            </plugin>-->
    <!--            <plugin>-->
    <!--                &lt;!&ndash;打包时去除第三方依赖&ndash;&gt;-->
    <!--                <groupId>org.springframework.boot</groupId>-->
    <!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
    <!--                <configuration>-->
    <!--                    <layout>ZIP</layout>-->
    <!--                    <includes>-->
    <!--                        <include>-->
    <!--                            <groupId>non-exists</groupId>-->
    <!--                            <artifactId>non-exists</artifactId>-->
    <!--                        </include>-->
    <!--                    </includes>-->
    <!--                </configuration>-->
    <!--            </plugin>-->
    <!--            &lt;!&ndash;拷贝第三方依赖文件到指定目录&ndash;&gt;-->
    <!--            <plugin>-->
    <!--                <groupId>org.apache.maven.plugins</groupId>-->
    <!--                <artifactId>maven-dependency-plugin</artifactId>-->
    <!--                <executions>-->
    <!--                    <execution>-->
    <!--                        <id>copy-dependencies</id>-->
    <!--                        <phase>package</phase>-->
    <!--                        <goals>-->
    <!--                            <goal>copy-dependencies</goal>-->
    <!--                        </goals>-->
    <!--                        <configuration>-->
    <!--                            &lt;!&ndash;target/lib是依赖jar包的输出目录，根据自己喜好配置&ndash;&gt;-->
    <!--                            <outputDirectory>target/lib</outputDirectory>-->
    <!--                            <excludeTransitive>false</excludeTransitive>-->
    <!--                            <stripVersion>false</stripVersion>-->
    <!--                            <includeScope>runtime</includeScope>-->
    <!--                            <excludeGroupIds>${project.groupId}</excludeGroupIds>-->
    <!--                        </configuration>-->
    <!--                    </execution>-->
    <!--                </executions>-->
    <!--            </plugin>-->
    <!--            <plugin>-->
    <!--                <artifactId>maven-antrun-plugin</artifactId>-->
    <!--                <version>1.8</version>-->
    <!--                <executions>-->
    <!--                    <execution>-->
    <!--                        <phase>package</phase>-->
    <!--                        <goals>-->
    <!--                            <goal>run</goal>-->
    <!--                        </goals>-->
    <!--                        <configuration>-->
    <!--                            <tasks>-->
    <!--                                &lt;!&ndash; 文件夹 &ndash;&gt;-->
    <!--                                <copy todir="${project.build.directory}/build/conf" overwrite="true">-->
    <!--                                    <fileset dir="${basedir}/src/main/resources">-->
    <!--                                        <include name="**/*.*"/>-->
    <!--                                        <exclude name="mybatis/*/*.*"/>-->
    <!--                                    </fileset>-->
    <!--                                    <fileset dir="${basedir}/../novel-common/src/main/resources">-->
    <!--                                        <include name="**/*.*"/>-->
    <!--                                        <exclude name="mybatis/**"/>-->
    <!--                                    </fileset>-->
    <!--                                </copy>-->
    <!--                                <move todir="${project.build.directory}/build/lib">-->
    <!--                                    <fileset dir="target/lib"/>-->
    <!--                                </move>-->
    <!--                                <copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"-->
    <!--                                      tofile="${project.build.directory}/build/${project.artifactId}.jar" />-->

    <!--                                <fixcrlf srcdir="${basedir}/src/main/build/scripts" eol="unix"/>-->
    <!--                                <copy todir="${project.build.directory}/build/bin">-->
    <!--                                    <fileset dir="${basedir}/src/main/build/scripts">-->
    <!--                                        <include name="*.sh" />-->
    <!--                                        <include name="*.txt" />-->
    <!--                                        <include name="*.bat" />-->
    <!--                                    </fileset>-->
    <!--                                </copy>-->
    <!--                                <zip destfile='${project.build.directory}/build/${project.artifactId}.zip'>-->
    <!--                                    <zipfileset filemode="755" dir= '${project.build.directory}/build/' />-->
    <!--                                </zip>-->
    <!--                            </tasks>-->
    <!--                        </configuration>-->
    <!--                    </execution>-->
    <!--                </executions>-->
    <!--            </plugin>-->
    <!--        </plugins>-->
    <!--    </build>-->

</project>
