<?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>34</version>
    <relativePath />
  </parent>

  <organization>
    <name>Apache Mavibot Project Parent</name>
    <url>http://directory.apache.org/mavibot/</url>
  </organization>

  <groupId>org.apache.directory.mavibot</groupId>
  <version>1.0.0-M7</version>
  <artifactId>mavibot-parent</artifactId>
  <name>ApacheDS Mavibot Parent</name>
  <packaging>pom</packaging>

  <prerequisites>
    <maven>3.0.0</maven>
  </prerequisites>

  <url>http://directory.apache.org/mavibot</url>
  <inceptionYear>2012</inceptionYear>

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

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

  <ciManagement>
    <notifiers>
      <notifier>
        <type>mail</type>
        <address>dev@directory.apache.org</address>
      </notifier>
    </notifiers>
  </ciManagement>
  
  <description>A MVCC BTree Implementation</description>

  <licenses>
    <license>
      <name>Apache 2.0 License</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <!-- Dependencies versions ========================================== -->
    <junit.version>4.12</junit.version>
    <commons.collections.version>3.2.1</commons.collections.version>
    <commons.io.version>2.4</commons.io.version>
    <slf4j.api.version>1.7.10</slf4j.api.version>
    <slf4j.log4j12.version>1.7.10</slf4j.log4j12.version>
  </properties>

  <modules>
    <module>mavibot</module>
    <module>distribution</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <!-- Testing -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- Logging -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.api.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <!-- ==================================== -->
  <!-- Common dependencies for all projects -->
  <!-- ==================================== -->
  <dependencies>
    <!-- common logging interface -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <!-- logging implementation used for unit tests -->

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <configuration>
            <excludeSubProjects>false</excludeSubProjects>
            <excludes>
              <!-- MAVEN_DEFAULT_EXCLUDES -->
              <exclude>**/target/**/*</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>
              <!-- Licences files -->
              <exclude>**/LICENSE.*</exclude>
              <exclude>**/NOTICE*.txt</exclude>
              <!-- Images and binary files -->
              <exclude>**/img/**/*</exclude>
            </excludes>
          </configuration>
         </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <optimize>true</optimize>
		  <debug>true</debug>
          <showDeprecations>true</showDeprecations>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
	  
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-source</id>
			<phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <tagNameFormat>
            @{project.version}
          </tagNameFormat>
          <tagBase>
            https://svn.apache.org/repos/asf/directory/mavibot/tags
          </tagBase>
        </configuration>
      </plugin>
    
      <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>findbugs-maven-plugin</artifactId>
           <configuration>
              <findbugsXmlOutput>true</findbugsXmlOutput>
              <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
              <xmlOutput>true</xmlOutput>
           </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java-16</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>1.6.0</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.geronimo.genesis.plugins</groupId>
        <artifactId>tools-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>verify-legal-files</id>
            <phase>verify</phase>
            <goals>
              <goal>verify-legal-files</goal>
            </goals>
            <configuration>
              <!-- Fail the build if no legal files were found -->
              <strict>false</strict>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- The Javadoc and xref generation 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>
        </dependencies>
        
        <configuration>
          <reportPlugins>
            <!-- JXR plugin generates cross-references -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jxr-plugin</artifactId>
              <configuration>
                  <aggregate>true</aggregate>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-report-plugin</artifactId>
              <configuration>
                <aggregate>true</aggregate> 
                <argLine>-Xmx1024m -XX:+UseConcMarkSweepGC</argLine>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-project-info-reports-plugin</artifactId>
            </plugin>

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>taglist-maven-plugin</artifactId>
              <configuration>
                <tags>
                  <tag>TODO</tag>
                  <tag>@todo</tag>
                  <tag>@deprecated</tag>
                  <tag>FIXME</tag>
                </tags>
              </configuration>
            </plugin>

            <!-- The Javadoc generation plugin -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <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.6</source>
              </configuration>
              <reportSets>
                <reportSet>
                  <reports>
                    <report>aggregate</report>
                    <report>test-aggregate</report>
                  </reports>
                </reportSet>
              </reportSets>
            </plugin>

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>versions-maven-plugin</artifactId>
              <reportSets>
                <reportSet>
                  <reports>
                    <report>dependency-updates-report</report>
                    <report>plugin-updates-report</report>
                    <report>property-updates-report</report>
                  </reports>
                </reportSet>
              </reportSets>
            </plugin>

            <plugin>
              <groupId>org.apache.rat</groupId>
              <artifactId>apache-rat-plugin</artifactId>
              <!-- must add configuration here too, it isn't inherited from <pluginConfiguration> :-( -->
              <configuration>
                <excludeSubProjects>false</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>
                  <!-- Images files -->
                  <exclude>**/img/*.png</exclude>
                  <exclude>**/img/*.graphml</exclude>
                </excludes>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>javancss-maven-plugin</artifactId>
            </plugin>

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>jdepend-maven-plugin</artifactId>
            </plugin>

          </reportPlugins>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>apache-release</id>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <phase>install</phase>

                <goals>
                  <goal>javadoc</goal>
                </goals>
                <configuration>
                  <aggregate>true</aggregate>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-jxr-plugin</artifactId>
            <configuration>
              <aggregate>true</aggregate>
            </configuration>

            <executions>
              <execution>
                <phase>install</phase>

                <goals>
                  <goal>jxr</goal>
                  <goal>test-jxr</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

