<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>cn.com.vastdata</groupId>
    <artifactId>vastbase-jdbc</artifactId>
    <name>Vastbase JDBC Driver</name>
    <version>2.13p</version>
    <description>Java JDBC driver for Vastbase</description>
    <url>https://gitee.com/vastdata/vastbase-jdbc</url>
    <developers>
        <developer>
            <name>Vastdata</name>
            <email>mvpub@vastdata.com.cn</email>
            <organization>Vastdata</organization>
            <organizationUrl>https://www.vastdata.com.cn/</organizationUrl>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <scm>
        <url>https://gitee.com/vastdata/vastbase-jdbc.git</url>
    </scm>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.8.0</version>
                <extensions>true</extensions>
                <configuration>
                    <autoPublish>false</autoPublish>
                </configuration>
            </plugin>

            <!-- 先解压已有JAR -->
            <!-- 使用 Antrun 解压 JAR -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>unpack-jar</id>
                        <phase>process-resources</phase>
                        <configuration>
                            <target>
                                <mkdir dir="${project.build.outputDirectory}"/>
                                <unzip src="${basedir}/lib/JDBC-VB_P-2.13-2025082015.jar"
                                       dest="${project.build.outputDirectory}"/>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 打包空的 sources.jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>empty-sources</id>
                        <phase>package</phase>
                        <goals><goal>jar</goal></goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <classesDirectory>${project.build.directory}/empty-sources</classesDirectory>
                        </configuration>
                    </execution>

                    <!-- 打包空的 javadoc.jar -->
                    <execution>
                        <id>empty-javadoc</id>
                        <phase>package</phase>
                        <goals><goal>jar</goal></goals>
                        <configuration>
                            <classifier>javadoc</classifier>
                            <classesDirectory>${project.build.directory}/empty-javadoc</classesDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- 标准打包主 JAR -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>
        </plugins>
    </build>
    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://ossrh-staging-api.central.sonatype.com/service/local/</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
    <properties>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
    </properties>
</project>