<?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>org.mule.tools.maven</groupId>
        <artifactId>mule-build-tools-parent</artifactId>
        <version>1.9.21</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>mule-revapi-extension</artifactId>

    <name>Mule Revapi Extension</name>
    <description>Provides support for accepting API boundaries defined by Mule modules.</description>

    <properties>
        <apiAnnotationsVersion>1.8.21</apiAnnotationsVersion>
        <revapi.skip>false</revapi.skip>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <jdk.version>17</jdk.version>
        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>api-annotations</artifactId>
            <version>${apiAnnotationsVersion}</version>
        </dependency>

        <dependency>
            <groupId>org.revapi</groupId>
            <artifactId>revapi-basic-features</artifactId>
        </dependency>
        <dependency>
            <groupId>org.revapi</groupId>
            <artifactId>revapi-java</artifactId>
        </dependency>
        <dependency>
            <groupId>org.revapi</groupId>
            <artifactId>revapi-java-spi</artifactId>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.takari.maven.plugins</groupId>
            <artifactId>takari-plugin-integration-testing</artifactId>
            <type>pom</type>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <release>${jdk.version}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.takari.maven.plugins</groupId>
                <artifactId>takari-lifecycle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>testProperties</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testProperties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <maven.home>${maven.home}</maven.home>
                        <maven.repo.local>${maven.repo.local}</maven.repo.local>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <configuration>
                    <compilerCompliance>${jdk.version}</compilerCompliance>
                    <compilerSource>${jdk.version}</compilerSource>
                    <compilerTargetPlatform>${jdk.version}</compilerTargetPlatform>
                    <configFile>${basedir}/${formatterConfigPath}</configFile>
                    <configJsFile>${basedir}/${formatterConfigPath}</configJsFile>
                    <aggregator>false</aggregator>
                    <executionRoot>true</executionRoot>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
