<?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>org.opendaylight.aaa</groupId>
        <artifactId>aaa-parent</artifactId>
        <version>0.5.4-Carbon</version>
        <relativePath>../parent</relativePath>
    </parent>

    <artifactId>aaa-h2-store</artifactId>
    <name>ODL :: aaa :: ${project.artifactId}</name>
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-authn-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-authn</artifactId>
        </dependency>
        <dependency>
            <groupId>org.immutables</groupId>
            <artifactId>value</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache</artifactId>
        </dependency>

        <!-- JDBC -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

        <!-- Testing Dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <!-- The import exclusions (note the ! prefix) are required because H2's MANIFEST has Import-Package for them (but we don't use these) -->
                        <Import-Package>
                            !javax.naming,
                            !javax.naming.spi,
                            !javax.servlet,
                            !javax.servlet.http,
                            !javax.tools,
                            !javax.transaction.xa,
                            !org.apache.lucene.analysis,
                            !org.apache.lucene.analysis.standard,
                            !org.apache.lucene.document,
                            !org.apache.lucene.index,
                            !org.apache.lucene.queryParser,
                            !org.apache.lucene.search,
                            !org.apache.lucene.store,
                            !org.apache.lucene.util,
                            !com.vividsolutions.jts.geom,
                            !com.vividsolutions.jts.io,
                            !org.osgi.service.jdbc,
                            !javax.annotation,
                            !javax.naming,
                            *</Import-Package>
                        <Private-Package>org.h2.*</Private-Package>
                    </instructions>
                </configuration>
            </plugin>
            <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/initial/tokens.cfg</file>
                          <type>cfg</type>
                          <classifier>config</classifier>
                        </artifact>
                      </artifacts>
                    </configuration>
                  </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
