<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) Copyright 2015 Netcentric AG. All rights reserved. This program
    and the accompanying materials are made available under the terms of the
    Eclipse Public License v1.0 which accompanies this distribution, and is available
    at http://www.eclipse.org/legal/epl-v10.html -->
<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>
    <!-- ====================================================================== -->
    <!-- P A R E N T P R O J E C T D E S C R I P T I O N -->
    <!-- ====================================================================== -->
    <parent>
        <groupId>biz.netcentric.cq.tools.accesscontroltool</groupId>
        <artifactId>accesscontroltool</artifactId>
        <version>2.5.5</version>
    </parent>

    <!-- ====================================================================== -->
    <!-- P R O J E C T D E S C R I P T I O N -->
    <!-- ====================================================================== -->

    <artifactId>accesscontroltool-startuphook-bundle</artifactId>
    <packaging>jar</packaging>
    <name>Access Control Tool Startup Hook Bundle</name>
    <description>Runs the AC Tool on startup at start level the bundle is defined.</description>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>accesscontroltool-bundle</artifactId>
            <version>${project.version}</version>
        </dependency>
        
        <!-- OSGi annotations (build time, but only use those compliant with R6) -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.annotation.versioning</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>
        <!-- OSGi Core/Compendium individual dependencies -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.framework</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.settings</artifactId>
        </dependency>

        <!-- START: Test Dependencies -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.testing</artifactId>
            <version>2.0.16</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.10.19</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- END: Test Dependencies -->

    </dependencies>

    <!-- ====================================================================== -->
    <!-- B U I L D D E F I N I T I O N -->
    <!-- ====================================================================== -->
    <build>
        <plugins>
            <!-- see https://github.com/apache/felix/tree/trunk/tools/osgicheck-maven-plugin -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>osgicheck-maven-plugin</artifactId>
                <version>0.1.0</version>
                <executions>
                    <execution>
                        <id>check-bundle</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>biz.aQute.bnd</groupId>
                <artifactId>bnd-maven-plugin</artifactId>
                <configuration>
                    <bnd><![CDATA[
Bundle-Description: ${project.description}
Bundle-DocURL: https://github.com/Netcentric/accesscontroltool
Bundle-License: Eclipse Public License, Version 1.0; link="https://www.eclipse.org/legal/epl-v10.html"
Bundle-SymbolicName: biz.netcentric.cq.tools.accesscontroltool.startuphook.bundle
Bundle-Vendor: Netcentric
Bundle-Activator: biz.netcentric.cq.tools.actool.startuphook.impl.StartupBundleActivator
Bundle-Name: ${project.name}
Conditional-Package: biz.netcentric.cq.tools.actool.helper.runtime
                    ]]></bnd>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>bnd-process</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <!-- use manifest generated from bnd-maven-plugin -->
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
