<?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>
    <parent>
        <groupId>org.xyzh</groupId>
        <artifactId>common</artifactId>
        <version>${school-news.version}</version>
    </parent>

    <groupId>org.xyzh</groupId>
    <artifactId>common-all</artifactId>
    <version>${school-news.version}</version>
    <packaging>jar</packaging>

    <name>Common All-in-One</name>
    <description>包含所有common模块功能的聚合jar包</description>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
    </properties>

    <dependencies>
        <!-- 包含所有common子模块 -->
        <dependency>
            <groupId>org.xyzh</groupId>
            <artifactId>common-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.xyzh</groupId>
            <artifactId>common-dto</artifactId>
        </dependency>
        <dependency>
            <groupId>org.xyzh</groupId>
            <artifactId>common-exception</artifactId>
        </dependency>
        <dependency>
            <groupId>org.xyzh</groupId>
            <artifactId>common-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.xyzh</groupId>
            <artifactId>common-annotation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.xyzh</groupId>
            <artifactId>common-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.xyzh</groupId>
            <artifactId>common-jdbc</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Maven Shade Plugin - 将所有依赖打包到一个jar中 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.4.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
