<?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.airlift</groupId>
        <artifactId>airlift</artifactId>
        <version>435</version>
    </parent>

    <artifactId>api-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <name>api-maven-plugin</name>
    <description>Airlift - Maven plugin for generating OpenAPI v3 specifications from API annotations</description>

    <properties>
        <air.main.basedir>${project.parent.basedir}</air.main.basedir>
        <dep.maven-plugin-api.version>3.9.16</dep.maven-plugin-api.version>
        <dep.maven-plugin-annotations.version>3.15.2</dep.maven-plugin-annotations.version>
        <dep.classgraph.version>4.8.184</dep.classgraph.version>
        <dep.takari-plugin-testing.version>3.1.1</dep.takari-plugin-testing.version>
        <dep.swagger-parser.version>2.1.39</dep.swagger-parser.version>
        <dep.swagger-models.version>2.2.51</dep.swagger-models.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <!-- Airlift API for OpenAPI generation -->
        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>api</artifactId>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>json</artifactId>
        </dependency>

        <!-- ClassGraph for annotation scanning -->
        <dependency>
            <groupId>io.github.classgraph</groupId>
            <artifactId>classgraph</artifactId>
            <version>${dep.classgraph.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${dep.maven-plugin-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${dep.maven-plugin-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${dep.maven-plugin-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${dep.maven-plugin-annotations.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-models</artifactId>
            <version>${dep.swagger-models.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.swagger.parser.v3</groupId>
            <artifactId>swagger-parser-core</artifactId>
            <version>${dep.swagger-parser.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.swagger.parser.v3</groupId>
            <artifactId>swagger-parser-v3</artifactId>
            <version>${dep.swagger-parser.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.takari.maven.plugins</groupId>
            <artifactId>takari-plugin-integration-testing</artifactId>
            <version>${dep.takari-plugin-testing.version}</version>
            <type>pom</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.takari.maven.plugins</groupId>
            <artifactId>takari-plugin-testing</artifactId>
            <version>${dep.takari-plugin-testing.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <testResources>
            <testResource>
                <targetPath>projects</targetPath>
                <filtering>true</filtering>
                <directory>src/test/projects</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${dep.maven-plugin-annotations.version}</version>
            </plugin>
            <plugin>
                <groupId>io.takari.maven.plugins</groupId>
                <artifactId>takari-lifecycle-plugin</artifactId>
                <version>2.3.4</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>testProperties</id>
                        <goals>
                            <goal>testProperties</goal>
                        </goals>
                        <phase>process-test-resources</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
