<?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>edu.internet2.middleware.grouper</groupId>
        <artifactId>grouper-parent</artifactId>
        <version>2.0.0</version>
        <relativePath>../grouper-parent</relativePath>
    </parent>

    <name>LDAP Provisioning Connector - New/Next Generation</name>
    <description>
        Provisions group memberships from Grouper (or other DataConnector) to an LDAP directory (or other SPML target).
    </description>
    <artifactId>ldappcng</artifactId>
    <packaging>jar</packaging>

    <repositories>
        <repository>
            <id>shibboleth.internet2.edu</id>
            <name>Internet2</name>
            <layout>default</layout>
            <url>http://shibboleth.internet2.edu/downloads/maven2</url>
        </repository>
        <repository>
            <id>vt-middleware.googlecode.com.repo</id>
            <url>http://vt-middleware.googlecode.com/svn/maven2</url>
        </repository>
    </repositories>

    <properties>
        <grouper.dir>../grouper</grouper.dir>
    </properties>

    <dependencies>
        <!-- Compile Dependencies -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>grouper</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <!-- xerces 2.0.2 from dbcp -->
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>grouper-shib</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>edu.vt.middleware</groupId>
            <artifactId>vt-ldap</artifactId>
        </dependency>
        <dependency>
            <groupId>edu.internet2.middleware</groupId>
            <artifactId>shibboleth-common</artifactId>
            <exclusions>
                <!-- Exclude logback in lieu of sl4j-log4j12 binding. -->
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>log4j-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.openspml</groupId>
            <artifactId>openspml2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.shared</groupId>
            <artifactId>shared-ldap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-protocol-ldap</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <!-- Provided Dependencies -->

        <!-- Runtime Dependencies -->

        <!-- Test Dependencies -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>grouper</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <testResources>
            <testResource>
                <filtering>true</filtering>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <argLine>-Xmx1024m</argLine>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${grouper.dir}/confForTest</additionalClasspathElement>
                        <additionalClasspathElement>${grouper.dir}/conf</additionalClasspathElement>
                    </additionalClasspathElements>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2.1</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/bin.xml</descriptor>
                        <descriptor>src/main/assembly/src.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <archive>
                        <index>true</index>
                        <manifestEntries>
                            <Main-Class>edu.internet2.middleware.ldappc.spml.PSPCLI</Main-Class>
                        </manifestEntries>
                        <manifestSections>
                            <manifestSection>
                                <name>edu/internet2/middleware/ldappc/</name>
                                <manifestEntries>
                                    <Implementation-Title>${project.artifactId}</Implementation-Title>
                                    <Implementation-Version>${project.version}</Implementation-Version>
                                    <Implementation-Vendor>grouper.internet2.edu</Implementation-Vendor>
                                </manifestEntries>
                            </manifestSection>
                        </manifestSections>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>ldappc</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.5</version>
                        <configuration>
                            <includes>
                                <include>**/ldappc/*Test.java</include>
                                <include>**/ldappc/configuration/*Test.java</include>
                                <include>**/ldappc/synchronize/*Test.java</include>
                                <include>**/ldappc/util/*Test.java</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ldappcng</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.5</version>
                        <configuration>
                            <includes>
                                <include>**/ldappc/spml/**/*Test.java</include>
                            </includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>EmbeddedApacheDS</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <testUseEmbeddedLdap>true</testUseEmbeddedLdap>
                <testUseActiveDirectory>false</testUseActiveDirectory>
                <base>dc=testgrouper,dc=edu</base>
                <groupObjectClass>groupOfNames</groupObjectClass>
                <edu.vt.middleware.ldap.ldapUrl>ldap://127.0.0.1:10388</edu.vt.middleware.ldap.ldapUrl>
                <edu.vt.middleware.ldap.base>dc=testgrouper,dc=edu</edu.vt.middleware.ldap.base>
                <edu.vt.middleware.ldap.authtype>simple</edu.vt.middleware.ldap.authtype>
                <edu.vt.middleware.ldap.serviceUser>uid=admin,ou=system</edu.vt.middleware.ldap.serviceUser>
                <edu.vt.middleware.ldap.serviceCredential>secret</edu.vt.middleware.ldap.serviceCredential>
                <edu.vt.middleware.ldap.ssl>false</edu.vt.middleware.ldap.ssl>
                <edu.vt.middleware.ldap.tls>false</edu.vt.middleware.ldap.tls>
                <!-- for ldappc -->
                <edu.vt.middleware.ldap.pagedResultsSize>0</edu.vt.middleware.ldap.pagedResultsSize>
                <edu.vt.middleware.ldap.searchResultHandlers>edu.internet2.middleware.ldappc.util.QuotedDnResultHandler,edu.vt.middleware.ldap.handler.FqdnSearchResultHandler</edu.vt.middleware.ldap.searchResultHandlers>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.5</version>
                        <configuration>
                            <excludes>
                                <exclude>**/ad/*</exclude>
                                <exclude>**/CRUDRangeTest.java</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>AD</id>
            <properties>
                <testUseEmbeddedLdap>false</testUseEmbeddedLdap>
                <testUseActiveDirectory>true</testUseActiveDirectory>
                <base>dc=testgrouper,dc=edu</base>
                <groupObjectClass>group</groupObjectClass>
                <edu.vt.middleware.ldap.base>dc=testgrouper,dc=edu</edu.vt.middleware.ldap.base>
                <edu.vt.middleware.ldap.authtype>simple</edu.vt.middleware.ldap.authtype>
                <!-- <edu.vt.middleware.ldap.ldapUrl>ldap://127.0.0.1:389</edu.vt.middleware.ldap.ldapUrl> -->
                <!-- <edu.vt.middleware.ldap.serviceUser>uid=admin,ou=system</edu.vt.middleware.ldap.serviceUser> -->
                <!-- <edu.vt.middleware.ldap.serviceCredential>password</edu.vt.middleware.ldap.serviceCredential> -->
                <edu.vt.middleware.ldap.ssl>true</edu.vt.middleware.ldap.ssl>
                <edu.vt.middleware.ldap.tls>false</edu.vt.middleware.ldap.tls>
                <!-- for ldappc -->
                <edu.vt.middleware.ldap.pagedResultsSize>100</edu.vt.middleware.ldap.pagedResultsSize>
                <edu.vt.middleware.ldap.searchResultHandlers>edu.internet2.middleware.ldappc.util.QuotedDnResultHandler,edu.vt.middleware.ldap.handler.FqdnSearchResultHandler,edu.internet2.middleware.ldappc.util.RangeSearchResultHandler</edu.vt.middleware.ldap.searchResultHandlers>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <!-- <version>2.5</version> -->
                        <configuration>
                            <excludes>
                                <exclude>**/notad/*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>OpenLDAP</id>
            <properties>
                <testUseEmbeddedLdap>false</testUseEmbeddedLdap>
                <testUseActiveDirectory>false</testUseActiveDirectory>
                <base>dc=testgrouper,dc=edu</base>
                <groupObjectClass>groupOfNames</groupObjectClass>
                <edu.vt.middleware.ldap.base>dc=testgrouper,dc=edu</edu.vt.middleware.ldap.base>
                <edu.vt.middleware.ldap.authtype>simple</edu.vt.middleware.ldap.authtype>
                <!-- <edu.vt.middleware.ldap.ldapUrl>ldap://127.0.0.1:389</edu.vt.middleware.ldap.ldapUrl> -->
                <!-- <edu.vt.middleware.ldap.serviceUser>uid=admin,ou=system</edu.vt.middleware.ldap.serviceUser> -->
                <!-- <edu.vt.middleware.ldap.serviceCredential></edu.vt.middleware.ldap.serviceCredential> -->
                <edu.vt.middleware.ldap.ssl>false</edu.vt.middleware.ldap.ssl>
                <edu.vt.middleware.ldap.tls>false</edu.vt.middleware.ldap.tls>
                <!-- for ldappc -->
                <edu.vt.middleware.ldap.pagedResultsSize>0</edu.vt.middleware.ldap.pagedResultsSize>
                <edu.vt.middleware.ldap.searchResultHandlers>edu.internet2.middleware.ldappc.util.QuotedDnResultHandler,edu.vt.middleware.ldap.handler.FqdnSearchResultHandler</edu.vt.middleware.ldap.searchResultHandlers>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>**/ad/*</exclude>
                                <exclude>**/CRUDRangeTest.java</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>RedHat</id>
            <properties>
                <testUseEmbeddedLdap>false</testUseEmbeddedLdap>
                <testUseActiveDirectory>false</testUseActiveDirectory>
                <base>dc=testgrouper,dc=edu</base>
                <groupObjectClass>groupOfNames</groupObjectClass>
                <edu.vt.middleware.ldap.base>dc=testgrouper,dc=edu</edu.vt.middleware.ldap.base>
                <edu.vt.middleware.ldap.authtype>simple</edu.vt.middleware.ldap.authtype>
                <!-- <edu.vt.middleware.ldap.ldapUrl>ldap://127.0.0.1:389</edu.vt.middleware.ldap.ldapUrl> -->
                <!-- <edu.vt.middleware.ldap.serviceUser>uid=admin,ou=system</edu.vt.middleware.ldap.serviceUser> -->
                <!-- <edu.vt.middleware.ldap.serviceCredential></edu.vt.middleware.ldap.serviceCredential> -->
                <edu.vt.middleware.ldap.ssl>true</edu.vt.middleware.ldap.ssl>
                <edu.vt.middleware.ldap.tls>false</edu.vt.middleware.ldap.tls>
                <!-- for ldappc -->
                <edu.vt.middleware.ldap.pagedResultsSize>0</edu.vt.middleware.ldap.pagedResultsSize>
                <edu.vt.middleware.ldap.searchResultHandlers>edu.internet2.middleware.ldappc.util.QuotedDnResultHandler,edu.vt.middleware.ldap.handler.FqdnSearchResultHandler</edu.vt.middleware.ldap.searchResultHandlers>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>**/ad/*</exclude>
                                <exclude>**/CRUDRangeTest.java</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>