<?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>run.mone</groupId>
        <artifactId>ozhera</artifactId>
        <version>1.4.0-jdk21-SNAPSHOT</version>
    </parent>

    <groupId>run.mone</groupId>
    <artifactId>ozhera-app</artifactId>
    <version>1.4-jdk21</version>
    <packaging>pom</packaging>

    <modules>
        <module>app-api</module>
        <module>app-server</module>
        <module>app-service</module>
        <module>app-common</module>
    </modules>

    <properties>
        <hera-app.release.version>1.4-jdk21</hera-app.release.version>
    </properties>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>run.mone</groupId>
                <artifactId>app-service</artifactId>
                <version>${hera-app.release.version}</version>
            </dependency>
            <dependency>
                <groupId>run.mone</groupId>
                <artifactId>app-server</artifactId>
                <version>${hera-app.release.version}</version>
            </dependency>
            <!-- inner module -->
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <compilerVersion>21</compilerVersion>
                    <source>21</source>
                    <target>21</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.0.0</version>
                <executions>
                    <execution>
                        <id>license-check</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-third-party</goal>
                        </goals>
                        <configuration>
                            <includeOptional>false</includeOptional>
                            <useMissingFile>false</useMissingFile>
                            <failOnMissing>false</failOnMissing>
                            <licenseMerges>
                                <licenseMerge>Apache License, Version 2.0|The Apache Software License, Version
                                    2.0|ASF 2.0|Apache 2|Apache-2.0|Apache 2.0 License|Apache 2.0|Apache License
                                    v2.0|Apache License 2.0|The Apache License, Version 2.0|The Apache Software License,
                                    Version 2.0
                                </licenseMerge>
                                <licenseMerge>The MIT License|MIT License</licenseMerge>
                                <licenseMerge>The 3-Clause BSD License|New BSD License|3-Clause BSD
                                    License|BSD|3-Clause BSD License|The New BSD License
                                </licenseMerge>
                            </licenseMerges>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- To package the source code, you need to add this plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <executable>gpg</executable>
                            <keyname>330CB139ECDEC8C703A5947BA1FF844D032E41DD</keyname>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>