<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright © 2016, 2017 Red Hat, Inc. and others.  All rights reserved.

 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html
 -->
<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>

    <!--
        Internal parent for testing single Karaf features. This parent should not be used by downstreams,
        who should use single-feature-parent.
    -->

    <parent>
        <groupId>org.opendaylight.odlparent</groupId>
        <artifactId>odlparent</artifactId>
        <version>14.3.2</version>
        <relativePath>../odlparent/pom.xml</relativePath>
    </parent>

    <artifactId>abstract-feature-parent</artifactId>
    <packaging>pom</packaging>
    <name>ODL :: odlparent :: ${project.artifactId}</name>

    <properties>
        <checkDependencyChange>false</checkDependencyChange>
        <failOnDependencyChange>false</failOnDependencyChange>

        <jacoco.skip>true</jacoco.skip>

        <!-- We typically do not have code in feature artifacts, which throws off maven-dependency-plugin -->
        <odlparent.dependency.skip>true</odlparent.dependency.skip>

        <!-- Do not attach sources -->
        <maven.source.skip>true</maven.source.skip>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.opendaylight.odlparent</groupId>
                    <artifactId>features-test-plugin</artifactId>
                    <version>14.3.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- execute SFT -->
            <plugin>
                <groupId>org.opendaylight.odlparent</groupId>
                <artifactId>features-test-plugin</artifactId>
                <extensions>false</extensions>
                <configuration>
                    <concurrent>false</concurrent>
                </configuration>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>disable-sft</id>
            <activation>
                <!-- Karaf does not have jre.properties for JDK27+ just yet -->
                <!-- FIXME: Karaf fails with Java 24+. Re-enable with Karaf-4.5.0. -->
                <jdk>[24,)</jdk>
            </activation>

            <properties>
                <sft.skip>true</sft.skip>
            </properties>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.ekryd.echo-maven-plugin</groupId>
                        <artifactId>echo-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>UNTESTED-JDK</id>
                                <goals>
                                    <goal>echo</goal>
                                </goals>
                                <phase>test</phase>
                                <configuration>
                                    <message>Running on JDK newer than 21, which is not supported. Skipping feature tests.</message>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
