<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>com.day.crx</groupId>
        <artifactId>crx-parent</artifactId>
        <version>2.4.30</version>
        <relativePath>../../parent/pom.xml</relativePath>
    </parent>

    <!-- ====================================================================== -->
    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
    <!-- ====================================================================== -->
    <artifactId>crx-auth-ldap</artifactId>
    <packaging>bundle</packaging>
  <url>https://adobe.com</url>
  <licenses>
    <license>
      <name>License Agreement</name>
      <url>http://adobe.com/go/terms</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <organization>
    <name>Adobe</name>
    <url>http://www.adobe.com/</url>
  </organization>
  <developers>
    <developer>
      <name>Adobe</name>
      <email>repo@adobe.com</email>
      <organization>Adobe</organization>
      <organizationUrl>http://www.adobe.com</organizationUrl>
    </developer>
  </developers>

    <name>Day CRX LDAP Authentication</name>
    <description>Fragment bundle which provides LDAPLoginModule support</description>

    <!-- ====================================================================== -->
    <!-- D E P E N D E N C I E S                                                -->
    <!-- ====================================================================== -->
    <dependencies>
        <!-- crx internal dependencies -->
        <dependency>
            <groupId>com.day.crx</groupId>
            <artifactId>crx-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.day.crx</groupId>
            <artifactId>crx-core</artifactId>
        </dependency>

        <!-- jsr 170 -->
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
        </dependency>

        <!-- ldap stuff -->
        <dependency>
            <groupId>com.day.commons</groupId>
            <artifactId>day-commons-ldapclient</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- misc -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-server-unit</artifactId>
            <version>1.5.5</version>
            <scope>test</scope>
        </dependency>

        <!-- OSGi Libraries -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>4.2.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <!-- ====================================================================== -->
    <!-- P R O F I L E   D E F I N I T I O N                                    -->
    <!-- ====================================================================== -->
    <profiles>
        <profile>
            <id>integrationTesting</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>

                            <excludes>
                                <exclude>nothing</exclude>
                            </excludes>
                            <!-- forkMode 'pertest' is important, because
                                 the various tests use different JAAS
                                 configurations that need to be reloaded
                                 for each test! -->
                            <forkMode>pertest</forkMode>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- ====================================================================== -->
    <!-- B U I L D   D E F I N I T I O N                                        -->
    <!-- ====================================================================== -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Category>jcr,crx</Bundle-Category>
                        <Bundle-Version>${project.version}</Bundle-Version>
                        <Fragment-Host>com.day.crx.sling.server</Fragment-Host>
                        <Export-Package>
                            com.day.crx.security.ldap.sync;version=${project.version}
                        </Export-Package>
                        <Import-Package>
                            com.day.crx.core.ntlm.*;resolution:=optional,
                            org.apache.jackrabbit.core.*;resolution:=optional,
                            *
                        </Import-Package>
                        <Embed-Dependency>
                            day-commons-ldapclient
                        </Embed-Dependency>
                    </instructions>
                </configuration>
            </plugin>

            <!-- use jaas configuration for tests -->
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                      <exclude>**/*Test.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
