<?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.itlym</groupId>
        <artifactId>shoulder-parent</artifactId>
        <version>1.2.1</version><!-- shoulder-version -->
        <relativePath>../../../shoulder-parent/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>shoulder-validation</artifactId>
    <name>${project.artifactId}</name>
    <url>https://doc.itlym.cn</url>
    <description>
        Shoulder 基于 Spring Boot Validation 的轻量Jar，提供了枚举、Json、白名单等校验注解，同时提供接口可查看各接口校验规则，甚至可以自动上报Api网关，实现快速开发，高效管理，降低前后端沟通成本。
    </description>

    <dependencies>

        <dependency>
            <groupId>cn.itlym</groupId>
            <artifactId>shoulder-core</artifactId>
        </dependency>

        <!--jakarta ee 替代 javax ee 官方已经改名-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>

        <!-- MimeType -->
        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-core</artifactId>
        </dependency>

        <!-- jmimemagic -->

        <!--<dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <optional>true</optional>
        </dependency>-->

        <!-- 接口参数校验 -->
        <!--<dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-validator-provider</artifactId>
        </dependency>-->


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.mockito</groupId>
                    <artifactId>mockito-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>


    <build>
        <plugins>
            <!-- compiler settings -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <!-- attach source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>

            <!-- javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <!-- deploy -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>

            <!-- findbugs -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>

            <!-- unit test settings when mvn test -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <!-- 自动生成错误码以及对应的翻译 可以在 target 目录生成所有实现 ErrorCode 接口错误码枚举类的翻译文件 -->
            <plugin>
                <groupId>cn.itlym.shoulder</groupId>
                <artifactId>shoulder-maven-plugin</artifactId>
                <configuration>
                    <!-- 【必填】本组件对应的错误码前缀 -->
                    <errorCodePrefix>${shoulder-framework.errcode-prefix}</errorCodePrefix>
                    <!-- 【必填】要生成错误码文件，扫描的包路径，通常为组件错误码枚举/常量类所在包路径，越精确，越能减少插件构建时间 -->
                    <scanPackage>org.shoulder.validate.exception</scanPackage>
                </configuration>
            </plugin>

        </plugins>
    </build>

</project>
