<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <groupId>com.ly.smart-doc</groupId>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>smart-doc</artifactId>
    <packaging>jar</packaging>
    <version>3.1.0</version>

    <name>smart-doc</name>
    <url>https://github.com/TongchengOpenSource/smart-doc.git</url>
    <description>Smart-doc is a tool that supports both JAVA RESTFUL API and Apache Dubbo RPC interface document
        generation.
    </description>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/TongchengOpenSource/smart-doc.git</url>
        <connection>scm:https://github.com/TongchengOpenSource/smart-doc.git</connection>
        <developerConnection>scm:https://github.com/TongchengOpenSource/smart-doc.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <name>shalousun</name>
            <email>836575280@qq.com</email>
            <url>https://github.com/shalousun</url>
        </developer>
    </developers>

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit.jupiter.version>5.12.1</junit.jupiter.version>
        <beetl.version>3.19.1.RELEASE</beetl.version>
        <common-util.version>2.2.8</common-util.version>
        <qdox.version>2.0.3.5</qdox.version>
        <datafaker.version>1.4.0</datafaker.version>
        <gson.version>2.12.1</gson.version>
        <eclipse.jgit.version>5.13.3.202401111512-r</eclipse.jgit.version>
        <slf4j-api.version>2.0.17</slf4j-api.version>

        <!-- plugin version -->
        <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
        <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
        <spring-javaformat-maven-plugin.version>0.0.43</spring-javaformat-maven-plugin.version>
        <central-publishing-maven-plugin.version>0.5.0</central-publishing-maven-plugin.version>
        <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.ibeetl</groupId>
            <artifactId>beetl</artifactId>
            <version>${beetl.version}</version>
        </dependency>
        <dependency>
            <groupId>com.ly.smart-doc</groupId>
            <artifactId>qdox</artifactId>
            <version>${qdox.version}</version>
        </dependency>
        <dependency>
            <groupId>net.datafaker</groupId>
            <artifactId>datafaker</artifactId>
            <version>${datafaker.version}</version>
        </dependency>
        <dependency>
            <groupId>io.github.shalousun</groupId>
            <artifactId>common-util</artifactId>
            <version>${common-util.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit</artifactId>
            <version>${eclipse.jgit.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!--compiler-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <!-- Source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- JavaDoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <!--
                    Fail the build if any Javadoc warnings or errors occur.
                    This ensures that all Javadoc issues are treated seriously.
                    -->
                    <failOnError>true</failOnError>
                    <additionalOptions>
                        <!--
                        Enable strict validation of Javadoc content.
                        The "all" option checks for syntax, references, and HTML issues.
                        -->
                        <additionalOption>-Xdoclint:all</additionalOption>
                    </additionalOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>validate-javadoc</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>package-javadoc-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- spring java format -->
            <plugin>
                <groupId>io.spring.javaformat</groupId>
                <artifactId>spring-javaformat-maven-plugin</artifactId>
                <version>${spring-javaformat-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <inherited>true</inherited>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <finalName>smart-doc</finalName>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${central-publishing-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central-ly</publishingServerId>
                            <autoPublish>false</autoPublish>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
