<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2014 Hewlett-Packard Development Company, L.P. 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>
    <parent>
        <groupId>org.opendaylight.aaa</groupId>
        <artifactId>features-aggregator</artifactId>
        <version>0.2.0-Lithium</version>
        <relativePath>../</relativePath>
    </parent>

    <artifactId>features-aaa-api</artifactId>
    <packaging>jar</packaging>

    <properties>
        <features.file>features.xml</features.file>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-authn-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-credential-store-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>features-yangtools</artifactId>
            <version>${yangtools.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
        </dependency>
        <!-- test to validate features.xml -->
        <dependency>
            <groupId>org.opendaylight.odlparent</groupId>
            <artifactId>features-test</artifactId>
            <version>${features.test.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- dependency for opendaylight-karaf-empty for use by testing -->
        <dependency>
            <groupId>org.opendaylight.controller</groupId>
            <artifactId>opendaylight-karaf-empty</artifactId>
            <version>${karaf.empty.version}</version>
            <type>zip</type>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>filter</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>${project.build.directory}/classes/${features.file}</file>
                                    <type>xml</type>
                                    <classifier>features</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
                        <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
                        <karaf.distro.version>${karaf.empty.version}</karaf.distro.version>
                    </systemPropertyVariables>
                    <dependenciesToScan>
                        <dependency>org.opendaylight.odlparent:features-test</dependency>
                    </dependenciesToScan>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <scm>
        <connection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</connection>
        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</developerConnection>
        <tag>HEAD</tag>
        <url>https://git.opendaylight.org/gerrit/gitweb?p=aaa.git;a=summary</url>
    </scm>
</project>
