<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>

    <groupId>io.aleph0</groupId>
    <artifactId>yap</artifactId>
    <version>0.0.0-b11</version>
    <name>yap</name>
    <inceptionYear>2025</inceptionYear>
    <description>yap is a Yet Another Pipeline for Java 21+</description>
    <url>https://github.com/aleph0io/yap</url>
    <packaging>pom</packaging>

    <organization>
        <name>aleph0</name>
        <url>https://www.aleph0.io/</url>
    </organization>

    <scm>
        <connection>scm:git:ssh://git@github.com/aleph0io/yap.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/aleph0io/yap.git</developerConnection>
        <url>https://github.com/aleph0io/yap/tree/main</url>
        <tag>v0.0.0</tag>
    </scm>

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

    <developers>
        <developer>
            <name>Andy Boothe</name>
            <email>andy@aleph0.io</email>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/aleph0io/yap</url>
    </issueManagement>

    <modules>
        <module>yap-core</module>
        <module>yap-bom</module>
        <module>yap-parent</module>
        <module>yap-messaging-core</module>
        <module>yap-messaging-test</module>
        <module>yap-messaging-gcp</module>
        <module>yap-messaging-jetty</module>
    </modules>

    <!-- For releasing to maven central -->
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.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.11.2</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <!-- Let's do fail on error -->
                                    <failOnError>true</failOnError>
                                </configuration>
                            </execution>
                        </executions>
                    </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>
                                <configuration>
                                  <keyname>${gpg.keyname}</keyname>
                                  <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
