<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>
        <artifactId>jsonschema2pojo</artifactId>
        <groupId>org.jsonschema2pojo</groupId>
        <version>1.3.2</version>
    </parent>

    <artifactId>jsonschema2pojo-gradle-plugin</artifactId>

    <packaging>jar</packaging>

    <name>${project.artifactId}</name>
    <url>https://github.com/joelittlejohn/jsonschema2pojo</url>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jsonschema2pojo-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>dev.gradleplugins</groupId>
            <artifactId>gradle-api</artifactId>
            <version>${gradle-api.version}</version>
            <scope>provided</scope>
            <exclusions>
                <!-- 8.11.1 depends on old versions that do not match the groovy compiler version, causing build to fail -->
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.groovy</groupId>
            <artifactId>groovy</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <integrationTestSourceDirectory>src/integrationTest/groovy</integrationTestSourceDirectory>
    </properties>

    <build>
        <sourceDirectory>${project.basedir}/src/main/groovy</sourceDirectory>
        <testSourceDirectory>${project.basedir}/src/test/groovy</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/groovy</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/test/groovy</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-integration-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${integrationTestSourceDirectory}</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                    <failOnWarning>false</failOnWarning>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>3.9.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-batch</artifactId>
                        <version>5.0.4-01</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.bluetrainsoftware.maven</groupId>
                <artifactId>groovydoc-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-docs</id>
                        <goals>
                            <goal>attach-docs</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <useFile>false</useFile>
                    <includes>
                        <include>**/*Spec.*</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <useFile>false</useFile>
                    <testSourceDirectory>${integrationTestSourceDirectory}</testSourceDirectory>
                </configuration>
            </plugin>
            <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>codenarc-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <pluginRepositories>
        <pluginRepository>
            <id>groovy-plugins-release</id>
            <url>https://groovy.jfrog.io/artifactory/plugins-release</url>
        </pluginRepository>
    </pluginRepositories>
</project>
