<?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>

    <!--
         Base parent POM for building and packaging single Karaf features.
         Karaf features are generated based on the POM dependencies; they can be supplemented by a base
         feature.xml file in src/main/feature.

         By default, such single features aren't tested for loadability; they're supposed to be aggregated
         in a feature repository (see feature-repo-parent), which is tested using SingleFeatureTest. The
         sft profile can be used to enforce SingleFeatureTest on single features too.

         Single features which aren't part of a repository can not be considered part of a project's API.
         In any case, refer to each project's declared features to determine their API and future
         availability.

         Users should do the following:

         - specify this as their parent
         - make sure the packaging is set to feature
         - setup projects <dependencies/> as needed for their features
    -->

    <parent>
        <groupId>org.opendaylight.odlparent</groupId>
        <artifactId>abstract-feature-parent</artifactId>
        <version>10.0.0</version>
        <relativePath>../abstract-feature-parent</relativePath>
    </parent>

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

    <build>
        <pluginManagement>
            <plugins>
                <!--
                    This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.
                -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.karaf.tooling</groupId>
                                        <artifactId>karaf-maven-plugin</artifactId>
                                        <versionRange>[4.1.5,)</versionRange>
                                        <goals>
                                            <goal>verify</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>${karaf.version}</version>
                <extensions>true</extensions>
                <configuration combine.children="append">
                    <enableGeneration>true</enableGeneration>
                    <simplifyBundleDependencies>true</simplifyBundleDependencies>
                    <checkDependencyChange>${checkDependencyChange}</checkDependencyChange>
                    <logDependencyChanges>true</logDependencyChanges>
                    <failOnDependencyChange>${failOnDependencyChange}</failOnDependencyChange>
                    <excludedArtifactIds>
                        <!-- These artifacts are provided by our Karaf distribution. -->
                        <!-- Keep in synch with karaf parent minimal bootFeatures. -->
                        <!-- Aries Blueprint -->
                        <excludedArtifactId>org.apache.aries.blueprint.api</excludedArtifactId>
                        <excludedArtifactId>org.apache.aries.blueprint.core</excludedArtifactId>
                        <!-- Aries Quiesce -->
                        <excludedArtifactId>org.apache.aries.quiesce.api</excludedArtifactId>
                        <!-- jline -->
                        <excludedArtifactId>jline</excludedArtifactId>
                        <!-- SLF4J -->
                        <excludedArtifactId>slf4j-api</excludedArtifactId>
                        <excludedArtifactId>jcl-over-slf4j</excludedArtifactId>
                        <!-- Karaf artifacts -->
                        <!-- TODO Rework this once Karaf supports wildcards here -->
                        <excludedArtifactId>org.apache.karaf.jaas.config</excludedArtifactId>
                        <excludedArtifactId>org.apache.karaf.jaas.modules</excludedArtifactId>
                        <excludedArtifactId>org.apache.karaf.shell.console</excludedArtifactId>
                        <excludedArtifactId>org.apache.karaf.shell.core</excludedArtifactId>
                        <!-- OSGi -->
                        <excludedArtifactId>org.osgi.compendium</excludedArtifactId>
                        <excludedArtifactId>org.osgi.core</excludedArtifactId>
                        <excludedArtifactId>org.osgi.enterprise</excludedArtifactId>
                        <!-- Bouncy Castle -->
                        <excludedArtifactId>bcprov-jdk15on</excludedArtifactId>
                        <excludedArtifactId>bcprov-ext-jdk15on</excludedArtifactId>
                        <excludedArtifactId>bcpkix-jdk15on</excludedArtifactId>
                        <excludedArtifactId>bcutil-jdk15on</excludedArtifactId>
                        <!-- JAXB -->
                        <excludedArtifactId>jaxb-api</excludedArtifactId>
                        <excludedArtifactId>jaxb-runtime</excludedArtifactId>
                        <excludedArtifactId>jakarta.xml.bind-api</excludedArtifactId>

                        <!-- Guava's annotations -->
                        <excludedArtifactId>error_prone_annotations</excludedArtifactId>
                        <excludedArtifactId>j2objc-annotations</excludedArtifactId>
                        <excludedArtifactId>listenablefuture</excludedArtifactId>

                        <!-- Our slf4j logging markers -->
                        <excludedArtifactId>logging-markers</excludedArtifactId>
                    </excludedArtifactIds>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
