<?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>dev.tnsai</groupId>
        <artifactId>tnsai-parent</artifactId>
        <version>0.18.4</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>tnsai-rewrite</artifactId>
    <packaging>jar</packaging>

    <name>TnsAI Rewrite</name>
    <description>OpenRewrite recipes that automate consumer code migration across TnsAI breaking changes (type and annotation renames, removed APIs). Consumers run them with the rewrite-maven-plugin — no hand-editing.</description>

    <properties>
        <!-- OpenRewrite is a build-time recipe engine, not a runtime dependency:
             the published jar ships only the declarative YAML recipes. These
             coordinates are needed solely to author and unit-test the recipes. -->
        <rewrite.version>8.90.4</rewrite.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.openrewrite</groupId>
                <artifactId>rewrite-bom</artifactId>
                <version>${rewrite.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Recipe building blocks (e.g. ChangeType) + the Java parser + the
             RewriteTest harness. All test-scoped: the consumer's
             rewrite-maven-plugin supplies the engine at migration time, so the
             published artifact carries the YAML recipes and nothing else. -->
        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-java</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-java-21</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-maven</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <!--
          mockito-core is unused by this module's tests, but the parent surefire
          argLine resolves -javaagent:${org.mockito:mockito-core:jar} via the
          maven-dependency-plugin `properties` goal, which only walks each project's
          own deps. Without this entry the javaagent path stays unresolved and the
          test JVM fails to start.
        -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.tngtech.archunit</groupId>
            <artifactId>archunit-junit5</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
