<?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>

    <parent>
        <groupId>com.composum.platform</groupId>
        <artifactId>composum-platform-models</artifactId>
        <version>1.1.0</version>
    </parent>

    <artifactId>composum-platform-models-bundle</artifactId>
    <packaging>bundle</packaging>

    <name>Composum Platform Models Bundle</name>
    <description>Bundle containing features for the general use of Models incl. Sling-Models bundled as a
        package</description>

    <properties>
        <bundle.name>com.composum.platform.models</bundle.name>
    </properties>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Category>${bundle.category}</Bundle-Category>
                        <Bundle-SymbolicName>${bundle.name}</Bundle-SymbolicName>
                        <Include-Resource>
                            {maven-resources}
                        </Include-Resource>
                        <Export-Package>
                            com.composum.platform.models.*
                        </Export-Package>
                        <Import-Package>
                            com.composum.sling.core.*;version="[1.11,2.1)",
                            com.composum.sling.nodes.*;version="[1.11,2.1)",
                            com.composum.sling.cpnl.*;version="[1.11,2.1)",
                            org.apache.sling.api.adapter.*;version="[2.2.0,3)",
                            org.apache.sling.api.request.*;version="[2.4.1,3)",
                            org.apache.sling.api.resource.*;version="[2.8.0,3)",
                            org.apache.sling.api.servlets.*;version="[2.1.1,3)",
                            org.apache.sling.api.*;version="[2.2.2,3)",
                            javax.annotation.*;version="[0,4)",
                            *
                        </Import-Package>
                        <Embed-Dependency>
                            *;scope=compile|runtime
                        </Embed-Dependency>
                        <Sling-Model-Packages>
                            com.composum.platform.models
                        </Sling-Model-Packages>
                    </instructions>
                </configuration>
            </plugin>

        </plugins>
    </build>
    <dependencies>

        <!-- Composum Nodes (Core) -->
        <dependency>
            <groupId>com.composum.sling.core</groupId>
            <artifactId>composum-sling-core-commons</artifactId>
        </dependency>

        <!-- Sling, JCR -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.jsp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.engine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.servlet-helpers</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.jcr.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.osgi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.models.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.models.impl</artifactId>
        </dependency>
        <dependency>
            <!-- This needs to be before org.apache.sling.xss in the classpath, since xss embeds an old version of commons-beanutils
            that isn't even exported, but is incompatible with what's used here. -->
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.xss</artifactId>
            <!-- Do not export this evil JAR containing loads of embedded dependencies which isn't OSGI exported. -->
            <scope>test</scope>
            <optional>true</optional>
        </dependency>

        <!-- JCR API, Jackrabbit -->
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-jcr-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit.vault</groupId>
            <artifactId>org.apache.jackrabbit.vault</artifactId>
        </dependency>

        <!-- JSON -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>

        <!-- Apache commons -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
        </dependency>
        <!-- This belongs here, so we mention it, but for technical reasons it needs to be included before sling.xss - see above.
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
        </dependency>
        -->

        <!-- OSGi, Felix -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.cmpn</artifactId>
        </dependency>

        <!-- Web Application API -->
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-atinject_1.0_spec</artifactId>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
        </dependency>

        <!-- Java Annotations -->
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
        </dependency>

        <!-- JUnit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.testing.sling-mock.junit4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.testing.logging-mock</artifactId>
        </dependency>

        <!-- TODO Temporary workaround for https://issues.apache.org/jira/browse/SLING-8576 . Once that's fixed this
          should be removed. -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.core</artifactId>
            <version>2.0.50</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>
