<?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>cpm-platform-htl</artifactId>
        <version>1.1.0</version>
    </parent>

    <artifactId>cpm-platform-htl-bundle</artifactId>
    <packaging>bundle</packaging>

    <name>Composum Platform HTL 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.htl</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.platform.htl.*</Export-Package>
                        <Import-Package>org.apache.felix.shell;resolution:=optional,
                            javax.annotation.*;version="[0,4)",
                            com.composum.sling.core.*;version="[2,4)",
                            org.apache.sling.scripting.sightly.render.*;version="[2.1,4)",
                            *</Import-Package>
                        <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
                    </instructions>
                </configuration>
            </plugin>

        </plugins>
    </build>
    <dependencies>

        <!-- Composum Platform -->
        <dependency>
            <groupId>com.composum.platform</groupId>
            <artifactId>composum-platform-models-bundle</artifactId>
        </dependency>

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

        <!-- Apache Sling -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.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.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.scripting.sightly</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.sightly.compiler</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.sightly.compiler.java</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.scripting.sightly.models.provider</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.classloader</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>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</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>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.annotation</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>

        <!-- 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>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-atinject_1.0_spec</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.xss</artifactId>
            <!-- This is an evil JAR with several old versions of libraries as embedded dependencies that aren't exported
            and can conflict with your code. "Optional" at least means that that doesn't conflict with artifacts
            using a bundle that uses the sling.xss bundle. https://issues.apache.org/jira/browse/SLING-8404
             -->
            <scope>test</scope>
            <optional>true</optional>
        </dependency>

        <!-- Needed dependencies to run generateHtlTld.groovy by hand. Normally unneccessary.
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>2.5.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-xml</artifactId>
            <version>2.5.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.composum.pages</groupId>
            <artifactId>composum-pages-commons-bundle</artifactId>
            <scope>test</scope>
        </dependency>
        -->

    </dependencies>
    <profiles>

        <profile>
            <id>installBundle</id>
        </profile>
        <profile>
            <id>installPackage</id>
        </profile>
        <profile>
            <id>installTestContent</id>
        </profile>

    </profiles>
</project>
