<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.sling</groupId>
        <artifactId>sling</artifactId>
        <version>17</version>
        <relativePath>../../../parent/pom.xml</relativePath>
    </parent>

    <artifactId>org.apache.sling.jcr.jackrabbit.server</artifactId>
    <packaging>bundle</packaging>
    <version>2.1.2</version>

    <name>Apache Sling Jackrabbit Embedded Repository</name>
    <description>
        Bundle providing support to embed Jackrabbit Repository
        instances and publish via RMI and/or JNDI
    </description>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.server-2.1.2</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.server-2.1.2</developerConnection>
        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.jcr.jackrabbit.server-2.1.2</url>
    </scm>

    <build>
        <plugins>
            <!-- generate the SCR descriptors -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
            </plugin>

            <!--
                copy the SCR descriptors into the correct location
                because the maven-scr-plugin cannot be configured
                to write the descriptors elsewhere
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                  <execution>
                    <id>copy-resources</id>
                    <phase>process-classes</phase>
                    <goals>
                      <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                      <outputDirectory>
                        ${project.build.outputDirectory}
                      </outputDirectory>
                      <encoding>UTF-8</encoding>
                      <resources>
                        <resource>
                          <directory>target/scr-plugin-generated</directory>
                          <filtering>false</filtering>
                        </resource>
                      </resources>
                    </configuration>
                  </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Category>
                            sling,jcr,jackrabbit
                        </Bundle-Category>
                        <Bundle-Activator>
                            org.apache.sling.jcr.jackrabbit.server.impl.Activator
                        </Bundle-Activator>
                        <Export-Package>
                             org.apache.sling.jcr.jackrabbit.server;version=2.1.0,
                             org.apache.sling.jcr.jackrabbit.server.security;version=2.0.4-incubator,
                             org.apache.sling.jcr.jackrabbit.server.security.accessmanager;version=2.1.0,
                             org.apache.jackrabbit.core.security.principal;version=2.2.5
                        </Export-Package>
                        <Private-Package>
                            org.apache.sling.jcr.jackrabbit.server.impl.*,
                            org.apache.commons.*
                        </Private-Package>
                        <Import-Package>
                            <!-- Sling and OSGi -->
                            org.apache.sling.*, org.osgi.*,
                            <!-- JNDI, Security, Transactions -->
                            javax.naming.*,
                            javax.security.*,
                            javax.sql.*,
                            javax.transaction.xa,
                            <!--  Helpers -->
                            org.apache.commons.io.*,
                            org.apache.commons.collections.*,
                            <!-- JCR and Jackrabbit API -->
                            javax.jcr.*, org.apache.jackrabbit.api.*,
                            org.apache.jackrabbit.spi.*,

                            <!-- Logging -->
                            org.slf4j,
                            <!-- XML stuff -->
                            javax.xml.*, org.xml.sax.*, org.w3c.dom.*,
                            <!-- JAR Service Registry for Query -->
                            javax.imageio.spi,

                            <!-- Exclude package, see JCR-2412 -->
                            !org.apache.jackrabbit.test,

                            <!-- playground imports -->
                            org.apache.tika.*,

                            <!-- Jackrabbit internals -->
                            org.apache.jackrabbit.util,
                            org.apache.jackrabbit.value,
                            org.apache.jackrabbit.commons.*,
                            org.apache.jackrabbit.spi.commons.*,

                            <!-- optional JDBC driver import -->
                            com.microsoft.sqlserver.jdbc;
                            oracle.jdbc;
                            org.apache.derby.jdbc;
                            org.gjt.mm.mysql;
                            org.h2;
                            org.postgresql;
                                resolution:=optional,

                            <!-- Required by concurrent lib SynchronizationTimer class -->
                            javax.swing.*;resolution:=optional
                        </Import-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>

                        <!-- Embedd some libraries -->
                        <Embed-Transitive>true</Embed-Transitive>
                        <Embed-Dependency>
                            jackrabbit-core,
                            lucene-core,
                            concurrent,
                            commons-dbcp,
                            commons-pool
                        </Embed-Dependency>
                        <_removeheaders>
                            Embed-Dependency,
                            Embed-Transitive,
                            Private-Package,
                            Include-Resource
                        </_removeheaders>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <excludePackageNames>
                        org.apache.sling.jcr.jackrabbit
                    </excludePackageNames>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <dependencies>
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.jcr.api</artifactId>
            <version>2.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.jcr.base</artifactId>
            <version>2.1.0</version>
            <scope>compile</scope>
        </dependency>

        <!-- The core repository implementation -->
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-api</artifactId>
            <version>2.4.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-core</artifactId>
            <version>2.4.2</version>
            <scope>compile</scope>
        </dependency>

        <!-- OSGi Libraries -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.annotations</artifactId>
        </dependency>
    </dependencies>

</project>
