<?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-services</artifactId>
        <version>1.8.0</version>
    </parent>

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

    <name>Composum Platform Security Bundle</name>
    <description>Security adaption and configuration</description>

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

    <build>
        <plugins>

            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
            </plugin>

            <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.sling.platform.security.*.impl.*,
                            com.composum.sling.platform.security.*
                        </Export-Package>
                        <Import-Package>
                            com.composum.sling.core.*;version="[3,5)",
                            com.composum.sling.nodes.*;version="[3,5)",
                            com.composum.sling.cpnl.*;version="[3,5)",
                            org.apache.sling.api.auth.*;version="[1.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)",
                            *
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>

        </plugins>
    </build>
    <dependencies>

        <!-- Composum Platform -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>composum-platform-commons-bundle</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Composum Nodes (Core) -->
        <dependency>
            <groupId>com.composum.nodes</groupId>
            <artifactId>composum-nodes-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.event</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.settings</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>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
        </dependency>

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

        <!-- Apache commons -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</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</groupId>
            <artifactId>javax.servlet-api</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>

        <!-- JUnit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

    </dependencies>
    <profiles>

        <profile>
            <id>uploadBundle</id>
            <activation>
                <property>
                    <name>upload.bundle</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>sling-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>install-bundle</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>
</project>
