<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>io.neba.neba-core</artifactId>
    <packaging>bundle</packaging>
    <name>NEBA core</name>

    <description>
        Contains the entire NEBA core implementation, i.e. the framework that interprets the
        NEBA API annotations and provides implementations for the service and lifecycle callback
        interfaces provided in the NEBA API. This package must not export anything as
        its implementation details are entirely private.
    </description>

    <parent>
        <groupId>io.neba</groupId>
        <artifactId>io.neba.neba-parent</artifactId>
        <version>5.2.1</version>
    </parent>

    <properties>
        <bundle.symbolicName>io.neba-core</bundle.symbolicName>
        <bundle.namespace>io.neba</bundle.namespace>
        <byte-buddy.artifactId>byte-buddy</byte-buddy.artifactId>
        <jackson.importVersionRange>[2.9,3)</jackson.importVersionRange>
    </properties>

    <dependencies>
        <!-- NEBA internal dependencies -->
        <dependency>
            <groupId>io.neba</groupId>
            <artifactId>io.neba.neba-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- External dependencies -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.jsp</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>servlet-api</artifactId>
                    <groupId>org.apache.tomcat</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.webconsole</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.http.jetty</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.component.annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.metatype.annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>${byte-buddy.artifactId}</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-atinject_1.0_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.spring-beans</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-Name>NEBA core</Bundle-Name>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Category>neba</Bundle-Category>
                        <Embed-Dependency>${byte-buddy.artifactId}</Embed-Dependency>
                        <Embed-Directory>lib</Embed-Directory>
                        <Private-Package>
                            io.neba.core.*
                        </Private-Package>
                        <Export-Package />
                        <Import-Package>
                            !org.apache.tools.*,
                            !jdk.*,
                            !sun.*,
                            org.eclipse.jetty.util;version="[9.2, 10)",
                            org.eclipse.jetty.websocket.server;version="[9.2, 10)",
                            org.eclipse.jetty.*;version="[9.2, 10)",
                            javax.servlet.*;version="[2.6, 5]",
                            javax.annotation.*;version="0.0.0";resolution:=optional,
                            com.fasterxml.jackson.*;version="${jackson.importVersionRange}";resolution:=optional,
                            *
                        </Import-Package>
                        <Sling-Initial-Content>
                            SLING-INF/repository-content;overwrite:=false;path:=/apps/neba
                        </Sling-Initial-Content>
                        <!-- Ignore warnings generated by content in bundled third-party JAR archives -->
                        <_fixupmessages>
                            "Classes found in the wrong directory: \{META-INF/versions/9/module-info.class=module-info\}";is:=ignore
                        </_fixupmessages>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
