<?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>
        <artifactId>tsdr</artifactId>
        <groupId>org.opendaylight.tsdr</groupId>
        <version>1.3.4-Carbon</version>
    </parent>
    <artifactId>tsdr-persistence-elasticsearch</artifactId>
    <packaging>bundle</packaging>
    <!-- <name> formatting is used by autorelease to parse and notify projects on
         build failure. Please do not modify this unless you have a good reason. -->
    <name>ODL :: tsdr :: ${project.artifactId}</name>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>${project.build.directory}/classes/configuration/initial/tsdr-persistence-elasticsearch.properties</file>
                                    <type>properties</type>
                                    <classifier>config</classifier>
                                </artifact>
                                <artifact>
                                    <file>${project.build.directory}/classes/configuration/initial/tsdr-persistence-elasticsearch_metric_mapping.json</file>
                                    <type>json</type>
                                    <classifier>metric_config</classifier>
                                </artifact>
                                <artifact>
                                    <file>${project.build.directory}/classes/configuration/initial/tsdr-persistence-elasticsearch_log_mapping.json</file>
                                    <type>json</type>
                                    <classifier>log_config</classifier>
                                </artifact>
                                <artifact>
                                    <file>${project.build.directory}/classes/configuration/initial/tsdr-persistence-elasticsearch_binary_mapping.json</file>
                                    <type>json</type>
                                    <classifier>binary_config</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${bundle.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Name>org.opendaylight.tsdr.elasticsearch</Bundle-Name>
                        <Bundle-Activator>org.opendaylight.tsdr.persistence.elasticsearch.Activator</Bundle-Activator>
                        <Import-Package>!org.apache.log,*</Import-Package>
                        <Private-Package>
                            io.searchbox.*,
                            org.apache.http.*,
                            org.apache.log,
                            org.apache.tomcat.jni,
                            com.jcraft.jzlib,
                            org.bouncycastle.crypto.prng,
                            org.bouncycastle.jce.provider,
                            org.bouncycastle.openssl,
                            org.apache.commons.logging.*,
                        </Private-Package>
                    </instructions>
                </configuration>
            </plugin>
            <!-- Disable fail on error only because of http://openjdk.java.net/jeps/212 bug -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <failOnError>false</failOnError>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>io.searchbox</groupId>
            <artifactId>jest</artifactId>
            <version>${jest.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.tsdr</groupId>
            <artifactId>tsdr-persistence-spi</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.dependencymanager</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <!-- Testing Dependencies. -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>
