<?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>net.wasdev.maven.parent</groupId>
        <artifactId>parent</artifactId>
        <version>1.4</version>
        <relativePath />
    </parent>

    <groupId>io.openliberty.tools</groupId>
    <artifactId>liberty-maven</artifactId>
    <version>3.11.1</version>
    <packaging>pom</packaging>
    <name>Liberty Tools for Maven</name>
    <description>
        Parent pom for Maven tools supporting development with 
        Websphere Liberty and Open Liberty
    </description>
    <url>https://github.com/OpenLiberty/ci.maven</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://raw.github.com/OpenLiberty/ci.maven/main/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:OpenLiberty/ci.maven.git</connection>
        <developerConnection>scm:git:git@github.com:OpenLiberty/ci.maven.git</developerConnection>
        <url>git@github.com:OpenLiberty/ci.maven.git</url>
        <tag>liberty-maven-3.11.1</tag>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <maven.version>3.8.6</maven.version>
        <maven.plugin.tools.version>3.9.0</maven.plugin.tools.version>
        <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
    </properties>

    <modules>
        <module>liberty-maven-app-parent</module>
        <module>liberty-maven-plugin</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>1.23</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>3.8.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${maven.plugin.tools.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <!--
          this profile will only activate on Java 9+
          and can be removed when switching Java baseline to 11+,
          as long as in this case the `maven.compiler.source` and `m.c.target` properties
          are being replaced with `m.c.release`.
        -->
        <profile>
            <id>run-animal-sniffer-plugin</id>
            <activation>
                <jdk>[9,]</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>animal-sniffer-maven-plugin</artifactId>
                        <configuration>
                            <signature>
                                <groupId>org.codehaus.mojo.signature</groupId>
                                <artifactId>java18</artifactId>
                                <version>1.0</version>
                            </signature>
                        </configuration>
                        <executions>
                            <execution>
                                <id>animal-sniffer</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
