<?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>io.github.abhiramrathod</groupId>
        <artifactId>mcpTesting</artifactId>
        <version>1.5.2</version>
    </parent>

    <artifactId>mcp-test-api</artifactId>
    <name>MCP Test API</name>

    <properties>
        <maven.deploy.skip>false</maven.deploy.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.github.abhiramrathod</groupId>
            <artifactId>mcp-test-client</artifactId>
        </dependency>
        <dependency>
            <groupId>io.github.abhiramrathod</groupId>
            <artifactId>mcp-test-codegen</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.10.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.nicoulaj.maven.plugins</groupId>
                <artifactId>checksum-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- JDK 21+ disables implicit annotation processing; force it so
             McpModelProcessor runs and generates the model classes. -proc:full is a
             JDK 21+ flag, so it must not be emitted on JDK 17 (CI), where implicit
             processing is enabled by default. -->
        <profile>
            <id>jdk-21-plus</id>
            <activation>
                <jdk>[21,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <proc>full</proc>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
