<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->
<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>org.apache.directory.project</groupId>
    <artifactId>project</artifactId>
    <version>40</version>
    <relativePath />
  </parent>

  <groupId>org.apache.directory.api</groupId>
  <artifactId>api-parent</artifactId>
  <name>Apache Directory LDAP API</name>
  <packaging>pom</packaging>
  <version>1.0.0</version>

  <properties>
    <additionalparam>-Xdoclint:none</additionalparam>
    <projectName>ApacheDS-LDAP-API</projectName>
    <distMgmtSiteUrl>scpexe://people.apache.org/www/directory.apache.org/api/gen-docs/${project.version}/</distMgmtSiteUrl>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    
    <!-- Set versions for depending projects -->
    <skin.version>1.0.3</skin.version>
    <org.apache.directory.junit.junit-addons.version>0.1</org.apache.directory.junit.junit-addons.version>
    <org.apache.directory.checkstyle-configuration.version>0.3</org.apache.directory.checkstyle-configuration.version>
    
    <!-- Set versions for depending jars -->
    <antlr.version>2.7.7</antlr.version>
    <commons.codec.version>1.10</commons.codec.version>
    <commons.collections.version>3.2.2</commons.collections.version>
    <commons.lang.version>2.6</commons.lang.version>
    <commons.pool.version>1.6</commons.pool.version>
    <dom4j.version>1.6.1</dom4j.version>
    <findbugs.annotations.version>1.0.0</findbugs.annotations.version>
    <forbiddenapis.version>2.2</forbiddenapis.version>
    <junit.version>4.12</junit.version>
    <log4j.version>1.2.17</log4j.version>
    <logback.version>1.2.3</logback.version>
    <mina.core.version>2.0.16</mina.core.version>
    <org.osgi.core.version>6.0.0</org.osgi.core.version>
    <org.apache.felix.version>5.6.4</org.apache.felix.version>
    <pax-exam.version>4.11.0</pax-exam.version>
    <pax-url.version>2.5.2</pax-url.version>
    <slf4j.api.version>1.7.25</slf4j.api.version>
    <slf4j.api.bundleversion>"$«range;[==,=+)»"</slf4j.api.bundleversion>
    <slf4j.log4j12.version>1.7.25</slf4j.log4j12.version>
    <xml.apis.version>2.0.2</xml.apis.version>
    <xpp3.version>1.1.4c</xpp3.version>
  </properties>
  
  <distributionManagement>
    <site>
      <id>apache.directory.shared</id>
      <url>${distMgmtSiteUrl}</url>
    </site>
  </distributionManagement>

  <issueManagement>
    <system>JIRA</system>
    <url>http://issues.apache.org/jira/browse/DIRAPI</url>
  </issueManagement>

  <modules>
    <module>i18n</module>
    <module>util</module>
    <module>asn1</module>
    <module>all</module>
    <module>ldap</module>
    <module>dsml</module>
    <module>integ</module>
    <module>integ-osgi</module>
    <module>integ-osgi2</module>
    <module>distribution</module>
  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <dependencies>
            <dependency><!-- downgrade Velocity to 1.5 until skin is updated to Velocity 1.7 -->
              <groupId>org.apache.velocity</groupId>
              <artifactId>velocity</artifactId>
              <version>1.5</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <configuration>
            <aggregate>true</aggregate>
           <forkCount>3</forkCount>
           <reuseForks>true</reuseForks>
           <argLine>-Xmx2048m -XX:MaxPermSize=512</argLine>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <configuration>
            <excludeSubProjects>true</excludeSubProjects>
            <excludes>
              <!-- MAVEN_DEFAULT_EXCLUDES -->
              <exclude>**/target/**/*</exclude>
              <exclude>**/cobertura.ser</exclude>
              <!-- ECLIPSE_DEFAULT_EXCLUDES -->
              <exclude>**/.classpath</exclude>
              <exclude>**/.project</exclude>
              <exclude>**/.settings/**/*</exclude>
              <!-- IDEA_DEFAULT_EXCLUDES -->
              <exclude>**/*.iml</exclude>
              <exclude>**/*.ipr</exclude>
              <exclude>**/*.iws</exclude>
              <!-- MANIFEST_MF_EXCLUDES -->
              <exclude>**/MANIFEST.MF</exclude>
              <!-- 3RD_PARTY_LICENSES -->
              <exclude>distribution/src/main/release/licenses/*</exclude>
              <exclude>src/main/release/licenses/*</exclude>
              <!-- Missing license header in dependency reduced pom, see http://jira.codehaus.org/browse/MSHADE-48 -->
              <exclude>**/dependency-reduced-pom.xml</exclude>
              <!-- Generated ldif files -->
              <exclude>ldap/schema/data/src/main/resources/schema/**</exclude>
              <exclude>ldap/schema/data/src/main/resources/schema-all.ldif</exclude>
              <exclude>schema/data/src/main/resources/schema/**</exclude>
              <exclude>schema/data/src/main/resources/schema-all.ldif</exclude>
              <exclude>data/src/main/resources/schema/**</exclude>
              <exclude>data/src/main/resources/schema-all.ldif</exclude>
              <exclude>src/main/resources/schema/**</exclude>
              <exclude>src/main/resources/schema-all.ldif</exclude>
              <!-- Exlude the imported external java code -->
              <exclude>**/src/main/java/org/apache/directory/api/ldap/model/password/BCrypt.java</exclude>
            </excludes>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <configuration>
            <failOnViolation>true</failOnViolation>
            <includeTestSourceDirectory>false</includeTestSourceDirectory>
          </configuration>
          <executions>
            <execution>
              <id>validate</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.7,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <versionRange>[2.2,)</versionRange>
                    <goals>
                      <goal>copy</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>antlr-maven-plugin</artifactId>
                    <versionRange>[2.7.7,)</versionRange>
                    <goals>
                      <goal>generate</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                    <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <versionRange>[2.16,)</versionRange>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </pluginExecutionFilter>
                    <action>
                        <ignore />
                    </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <dependencies>
          <!-- Add support for 'scp'/'sftp' -->
          <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
            <version>2.1</version>
          </dependency>
          <!-- Add support for 'scpexe' -->
          <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh-external</artifactId>
            <version>2.1</version>
          </dependency>
          <!-- Needed for mvn site to work.-->
          <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.5</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <show>private</show>
          <nohelp>true</nohelp>
        </configuration>
      </plugin>


      <plugin>
        <groupId>de.thetaphi</groupId>
        <artifactId>forbiddenapis</artifactId>
        <version>${forbiddenapis.version}</version>
        <configuration>
          <internalRuntimeForbidden>false</internalRuntimeForbidden>
          <failOnUnsupportedJava>true</failOnUnsupportedJava>
          <failOnViolation>true</failOnViolation>
          <bundledSignatures>
            <bundledSignature>jdk-unsafe</bundledSignature>
            <bundledSignature>jdk-deprecated</bundledSignature>
          </bundledSignatures>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
              <goal>testCheck</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <!-- Project sub-modules dependencies -->
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-all</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-asn1-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-asn1-ber</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-dsml-engine</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-dsml-parser</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-i18n</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-client-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-codec-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-codec-standalone</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-extras-aci</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-extras-codec</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-extras-codec-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-extras-sp</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-extras-trigger</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-extras-util</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-model</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-net-mina</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-schema-converter</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-ldap-schema-data</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>api-util</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- Mina dependencies -->

      <dependency>
        <groupId>org.apache.mina</groupId>
        <artifactId>mina-core</artifactId>
        <version>${mina.core.version}</version>
      </dependency>

      <!-- Commons dependencies -->

      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${commons.codec.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>${commons.collections.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>${commons.lang.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-pool</groupId>
        <artifactId>commons-pool</artifactId>
        <version>${commons.pool.version}</version>
      </dependency>

      <!-- OSGi and Felix Dependencies -->

      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>${org.osgi.core.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.framework</artifactId>
        <version>${org.apache.felix.version}</version>
      </dependency>

      <!-- Test dependencies -->

      <dependency>
        <groupId>org.apache.directory.junit</groupId>
        <artifactId>junit-addons</artifactId>
        <version>${org.apache.directory.junit.junit-addons.version}</version>
      </dependency>

      <dependency>
          <groupId>org.ops4j.pax.exam</groupId>
          <artifactId>pax-exam-container-forked</artifactId>
          <version>${pax-exam.version}</version>
      </dependency>

      <dependency>
          <groupId>org.ops4j.pax.exam</groupId>
          <artifactId>pax-exam-junit4</artifactId>
          <version>${pax-exam.version}</version>
      </dependency>

      <dependency>
          <groupId>org.ops4j.pax.exam</groupId>
          <artifactId>pax-exam-link-mvn</artifactId>
          <version>${pax-exam.version}</version>
      </dependency>

      <dependency>
          <groupId>org.ops4j.pax.url</groupId>
          <artifactId>pax-url-aether</artifactId>
          <version>${pax-url.version}</version>
      </dependency>

      <dependency>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
          <version>${logback.version}</version>
      </dependency>

      <!-- Logging dependencies -->

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.api.version}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.log4j12.version}</version>
      </dependency>

      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      
      <!-- Other dependencies -->

      <dependency>
        <groupId>antlr</groupId>
        <artifactId>antlr</artifactId>
        <version>${antlr.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.servicemix.bundles</groupId>
        <artifactId>org.apache.servicemix.bundles.antlr</artifactId>
        <version>${antlr.version}_5</version>
      </dependency>

      <dependency>
        <groupId>org.apache.servicemix.bundles</groupId>
        <artifactId>org.apache.servicemix.bundles.dom4j</artifactId>
        <version>${dom4j.version}_5</version>
      </dependency>

      <dependency>
        <groupId>org.apache.servicemix.bundles</groupId>
        <artifactId>org.apache.servicemix.bundles.xpp3</artifactId>
        <version>${xpp3.version}_7</version>
      </dependency>

      <dependency>
        <groupId>findbugs</groupId>
        <artifactId>annotations</artifactId>
        <version>${findbugs.annotations.version}</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>

      <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>${xml.apis.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/directory/shared/tags/1.0.0</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/directory/shared/tags/1.0.0</developerConnection>
    <url>http://svn.apache.org/viewvc/directory/shared/tags/1.0.0</url>
  </scm>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <configuration>
          <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
        
        <reportSets>
          <reportSet>
            <reports>
              <report>dependencies</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
     
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <aggregate>true</aggregate>
          <inputEncoding>UTF-8</inputEncoding>
          <outputEncoding>UTF-8</outputEncoding>
          <windowTitle>Apache LDAP API ${project.version} Cross Reference</windowTitle>
          <docTitle>Apache LDAP API ${project.version} Cross Reference</docTitle>
        </configuration>
      </plugin>
 
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <windowtitle>Apache LDAP API ${project.version} API Documentation</windowtitle>
          <doctitle>Apache LDAP API ${project.version} API Documentation</doctitle>
          <minmemory>512m</minmemory>
          <maxmemory>1g</maxmemory>
          <linksource>true</linksource>
          <tags>
            <tag>
              <name>todo</name>
              <!-- todo tag for all places -->
              <placement>a</placement>
              <head>To do:</head>
            </tag>
          </tags>
          <source>1.7</source>
          <excludePackageNames>org.apache.directory.api.ldap.model.schema.syntaxes</excludePackageNames>
          <show>public</show>
        </configuration>

        <reportSets>
          <reportSet>
            <id>apidocs</id>
            <inherited>false</inherited>
            <reports>
              <report>aggregate</report>
              <report>test-aggregate</report>
            </reports>
          </reportSet>
        </reportSets>

      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>apache-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>source-release-assembly</id>
                <configuration>
                  <!-- we have a dedicated distribution module -->
                  <skipAssembly>true</skipAssembly>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.rat</groupId>
            <artifactId>apache-rat-plugin</artifactId>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
         </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
