<?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>io.github.linsminecraftstudio.mxlib</groupId>
        <artifactId>MxLib</artifactId>
        <version>1.0.2</version>
    </parent>

    <packaging>jar</packaging>
    <artifactId>mxlib-all</artifactId>
    <description>A library for Minecraft plugins.</description>

    <url>https://github.com/LinsMinecraftStudio/MxLib</url>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <developers>
        <developer>
            <name>lijinhong11</name>
            <organization>LinsMinecraftStudio</organization>
            <organizationUrl>https://github.com/LinsMinecraftStudio</organizationUrl>
            <email>tygfhk@outlook.com</email>
            <timezone>+8</timezone>
            <url>https://github.com/lijinhong11</url>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/LinsMinecraftStudio/MxLib.git</connection>
        <developerConnection>scm:git:https://github.com/LinsMinecraftStudio/MxLib.git</developerConnection>
        <url>https://github.com/LinsMinecraftStudio/MxLib</url>
    </scm>

    <licenses>
        <license>
            <name>GPL License 3.0</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <finalName>MxLib-v${revision}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>all</shadedClassifierName>
                        </configuration>
                    </execution>
                </executions>
                <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>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.11.2</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doclint>all</doclint>
                    <show>public</show>
                    <nohelp>true</nohelp>
                    <encoding>UTF-8</encoding>
                    <charset>UTF-8</charset>
                    <failOnError>false</failOnError>
                    <sourcepath>
                        ${project.basedir}/../mx-chat/src/main/java;
                        ${project.basedir}/../mx-inventory/src/main/java
                    </sourcepath>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                        <configuration>
                            <classifier>all</classifier>
                            <includes>
                                <include>../mx-chat/src/main/java/io/github/linsminecraftstudio/mxlib/chat/**/*.java</include>
                                <include>../mx-inventory/src/main/java/io/github/linsminecraftstudio/mxlib/inventory/**/*.java</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.2.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <passphrase>${gpg.passphrase}</passphrase>
                    <executable>gpg</executable>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.6.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>io.github.linsminecraftstudio.mxlib</groupId>
            <artifactId>mx-inventory</artifactId>
            <version>1.0.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.github.linsminecraftstudio.mxlib</groupId>
            <artifactId>mx-chat</artifactId>
            <version>1.0.2</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
</project>