<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.silentsamurai</groupId>
    <artifactId>speedy-api-parent</artifactId>
    <version>3.1.10</version>
    <name>speedy-api-parent</name>
    <description>All entity in one api resource manager</description>
    <packaging>pom</packaging>

    <url>https://github.com/silentsamurai/Speedy-API</url>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.3.13</version>
        <relativePath/> <!-- look up parent sender repository -->
    </parent>

    <properties>
        <maven.compiler.release>17</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>17</java.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <!--        <kotlin.version>1.8.0</kotlin.version>-->
        <springdoc.version>2.5.0</springdoc.version>
        <!--        <junit-jupiter.version>5.7.1</junit-jupiter.version>-->
    </properties>

    <modules>
        <module>speedy-core</module>
        <module>spring-boot-starter-speedy-api</module>
        <module>speedy-test-app</module>
        <module>antlr-parser</module>
        <module>speedy-commons</module>
        <module>speedy-mp-jpa</module>
        <module>speedy-client</module>
        <module>speedy-mp-json</module>
        <module>speedy-qp-jooq</module>
        <module>speedy-io-json</module>
        <module>speedy-io-yaml</module>
        <module>speedy-io-xml</module>
        <module>jacoco-aggregate</module>
    </modules>

    <developers>
        <developer>
            <name>Sourav Das</name>
            <email>sourav.das08@outlook.com</email>
            <organization>com.github.silentsamurai</organization>
            <organizationUrl>http://www.github.com/silentsamurai</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>


    <scm>
        <connection>scm:git:git://github.com/silentsamurai/Speedy-API.git</connection>
        <developerConnection>scm:git:ssh://github.com:silentsamurai/Speedy-API.git</developerConnection>
        <url>https://github.com/silentsamurai/Speedy-API/tree/master</url>
    </scm>


    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>central-portal</id>
            <url>https://central.sonatype.com/api/v1/snapshots</url>
        </snapshotRepository>
    </distributionManagement>


    <build>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.13</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.6.3</version>
                <configuration>
                    <source>17</source>
                    <doclint>none</doclint>
                    <failOnError>false</failOnError>
                    <show>public</show>
                    <nohelp>true</nohelp>
                    <encoding>UTF-8</encoding>
                    <charset>UTF-8</charset>
                    <docencoding>UTF-8</docencoding>
                    <additionalJOption>--enable-preview</additionalJOption>
                    <additionalJOption>-J--add-opens=jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED
                    </additionalJOption>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>javadoc-site</id>
                        <phase>site</phase>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                        <configuration>
                            <reportOutputDirectory>${project.reporting.outputDirectory}/javadoc</reportOutputDirectory>
                            <destDir>${project.reporting.outputDirectory}/javadoc</destDir>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>

    <profiles>
        <profile>
            <id>central-portal</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.8.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central-portal</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!--                    <plugin>-->
                    <!--                        <groupId>org.apache.maven.plugins</groupId>-->
                    <!--                        <artifactId>maven-gpg-plugin</artifactId>-->
                    <!--                        <version>1.5</version>-->
                    <!--                        <executions>-->
                    <!--                            <execution>-->
                    <!--                                <id>sign-artifacts</id>-->
                    <!--                                <phase>verify</phase>-->
                    <!--                                <goals>-->
                    <!--                                    <goal>sign</goal>-->
                    <!--                                </goals>-->
                    <!--                            </execution>-->
                    <!--                        </executions>-->
                    <!--                        <configuration>-->
                    <!--                            <gpgArguments>-->
                    <!--                                <arg>&#45;&#45;pinentry-mode</arg>-->
                    <!--                                <arg>loopback</arg>-->
                    <!--                            </gpgArguments>-->
                    <!--                        </configuration>-->
                    <!--                    </plugin>-->
                </plugins>
            </build>
        </profile>
    </profiles>

</project>