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

    <groupId>ai.wanaku</groupId>
    <artifactId>wanaku</artifactId>
    <name>Wanaku</name>
    <inceptionYear>2025</inceptionYear>
    <url>https://github.com/wanaku-ai/wanaku</url>
    <description>Wanaku MCP Router</description>

    <version>0.1.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <developers>
        <developer>
            <name>The Wanaku Development Team</name>
            <email>contact@wanaku.ai</email>
            <url>https://wanaku.ai</url>
            <organization>Wanaku</organization>
            <organizationUrl>http://wanaku.ai</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/wanaku-ai/wanaku.git</connection>
        <developerConnection>scm:git:https://github.com/wanaku-ai/wanaku.git</developerConnection>
        <url>https://github.com/wanaku-ai/wanaku</url>
        <tag>HEAD</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <maven.compiler.release>21</maven.compiler.release>
        <os-maven-plugin.version>1.7.1</os-maven-plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <distribution.directory>${project.build.directory}/distributions</distribution.directory>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
        <maven-release-plugin.version>3.3.1</maven-release-plugin.version>
        <maven-scm-plugin.version>2.2.1</maven-scm-plugin.version>
        <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
        <maven-dependency-plugin.version>3.10.0</maven-dependency-plugin.version>
    </properties>

    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>${os-maven-plugin.version}</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <preparationGoals>-PcommitFiles clean scm:add scm:checkin install</preparationGoals>
                    <completionGoals>-PcommitFiles clean scm:add scm:checkin install</completionGoals>
                    <pushChanges>false</pushChanges>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <name>Central Portal Snapshots</name>
            <id>central-portal-snapshots</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <modules>
        <module>parent</module>
        <module>core</module>
        <module>capabilities-quarkus-sdk</module>
        <module>apps</module>
        <module>capabilities</module>
        <module>archetypes</module>
        <module>services</module>
        <module>tests</module>
    </modules>

    <profiles>
        <profile>
            <id>dist</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <attach>true</attach>
                                    <doclint>all,-missing</doclint>
                                    <failOnWarnings>false</failOnWarnings>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <attach>true</attach>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <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</publishingServerId>
                            <autoPublish>true</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>
        <profile>
            <id>commitFiles</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-scm-plugin</artifactId>
                            <version>${maven-scm-plugin.version}</version>
                            <configuration>
                                <message>[maven-scm-plugin] Update version in files</message>
                                <includes>apps/ui/admin/**/*.ts,apps/wanaku-router-backend/src/main/webui/openapi.json,apps/wanaku-router-backend/src/main/webui/openapi.yaml,jbang-catalog.json</includes>
                                <excludes>apps/ui/admin/node_modules/**</excludes>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>

</project>
