<?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>java7-parent</artifactId>
        <version>1.4</version>
        <relativePath />
    </parent>

    <groupId>io.openliberty.tools</groupId>
    <artifactId>liberty-ant-tasks</artifactId>
    <version>1.9.8</version>
    <name>Open Liberty and WebSphere Liberty Ant Tasks</name>
    <description>Parent pom for Ant tasks supporting development with Open Liberty and WebSphere Liberty.</description>
    <url>https://github.com/openliberty/ci.ant</url>

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

    <scm>
        <connection>scm:git:git@github.com:openliberty/ci.ant.git</connection>
        <developerConnection>scm:git:git@github.com:openliberty/ci.ant.git</developerConnection>
        <url>git@github.com:openliberty/ci.ant.git</url>
        <tag>liberty-ant-tasks-1.9.8</tag>
    </scm>

    <repositories>
        <!-- Configure Sonatype OSS Maven snapshots repository -->
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.10.9</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20180813</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <debug>false</debug>
                        <goals>
                            <goal>install</goal>
                        </goals>
                        <projectsDirectory>src/it</projectsDirectory>
                        <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                        <setupIncludes>
                            <setupInclude>${project.build.directory}/it/setup/pom.xml</setupInclude>
                        </setupIncludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>install</goal>
                                <goal>run</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.0</version>
                    <configuration>
                        <excludes>
                            <exclude>${jdk.7.excludes}</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>1.7.excludes</id>
            <activation>
                <jdk>1.7</jdk>
            </activation>
            <properties>
                <jdk.7.excludes>**/SpringBootUtilTest.java</jdk.7.excludes>
            </properties>
        </profile>
        <profile>
            <id>1.8+excludes</id>
            <activation>
                <jdk>[1.8,10)</jdk>
            </activation>
            <properties>
                <jdk.7.excludes>none</jdk.7.excludes>
            </properties>
        </profile>
        <profile>
            <id>online-its</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <configuration>
                            <properties>
                                <wlpVersion>${wlpVersion}</wlpVersion>
                                <wlpLicense>${wlpLicense}</wlpLicense>
                            </properties>
                            <profiles>
                                <profile>online-test</profile>
                            </profiles>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>offline-its</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <configuration>
                            <properties>
                                <wlpInstallDir>${wlpInstallDir}</wlpInstallDir>
                            </properties>
                            <profiles>
                                <profile>offline-test</profile>
                            </profiles>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
