<?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.smallrye</groupId>
        <artifactId>smallrye-graphql-client-parent</artifactId>
        <version>2.18.2</version>
    </parent>

    <artifactId>smallrye-graphql-client-generator</artifactId>
    <name>SmallRye: GraphQL Client :: Generator</name>
    
    <properties>
        <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
    </properties>

    <build>
        <!-- The clean is necessary every time or the late-resources are already in the target  -->
        <defaultGoal>clean install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>*Behavior</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <!--
                             If we'd put javax.annotation.processing.Processor into the normal `resources`,
                             then javac would try to invoke our annotation processor to build itself.
                             Instead, we manually copy it after the compile is over.
                            -->
                            <outputDirectory>${basedir}/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/late-resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <configuration>
                            <archive>
                                <manifestEntries>
                                    <Automatic-Module-Name>io.smallrye.graphql.client.generator</Automatic-Module-Name>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>io.smallrye</groupId>
            <artifactId>smallrye-graphql-client-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.graphql-java</groupId>
            <artifactId>graphql-java</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
