<?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>

  <organization>
    <name>Apache Mavibot Project Parent</name>
    <url>http://directory.apache.org/mavibot/</url>
  </organization>

  <groupId>net.xdob.directory.mavibot</groupId>
  <version>1.0.0-M8V20260126</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-M8</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/directory/mavibot/tags/1.0.0-M8</developerConnection>
    <url>http://svn.apache.org/viewvc/directory/mavibot/tags/1.0.0-M8</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>
    <host>nexus.doob.net.cn</host>
    <!-- Dependencies versions ========================================== -->
    <junit.version>4.12</junit.version>
    <commons.collections.version>4.5.0-M3</commons.collections.version>
    <commons.io.version>2.4</commons.io.version>
    <slf4j.api.version>1.7.25</slf4j.api.version>
    <slf4j.log4j12.version>1.7.25</slf4j.log4j12.version>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>snapshots</id>
      <name>ossrh-snapshots</name>
      <url>https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <name>Internal Releases</name>
      <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
  <modules>
    <module>mavibot</module>
    <module>distribution</module>
  </modules>
  <repositories>
    <repository>
      <id>repo_5</id>
      <name>repo_5</name>
      <url>http://${host}:8081/repository/maven-public/</url>
    </repository>
  </repositories>

  <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.8</source>
          <target>1.8</target>
          <optimize>true</optimize>
		  <debug>true</debug>
          <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>
              <xmlOutput>true</xmlOutput>
           </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java-18</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>1.8.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>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <goals>
              <goal>sign</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
        <!-- 无需任何configuration，插件自动读取settings.xml中的signing.*属性 -->
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <!-- 绑定到package阶段：执行mvn package时自动生成Javadoc包 -->
            <phase>package</phase>
            <goals>
              <!-- 核心goal：生成-javadoc.jar包，仓库必须检测到这个文件 -->
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <!-- 解决中文乱码、语法警告导致构建失败的问题（避免Javadoc包生成中断） -->
        <configuration>
          <encoding>UTF-8</encoding>
          <docencoding>UTF-8</docencoding>
          <charset>UTF-8</charset>
          <!-- 忽略注释小问题，避免生成Javadoc包失败 -->
          <failOnError>false</failOnError>
          <!-- 兼容JDK11+的严格检查，解决JDK版本导致的生成失败 -->
          <additionalJOption>-Xdoclint:none</additionalJOption>
        </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>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-jxr-plugin</artifactId>
            <executions>
              <execution>
                <phase>install</phase>

                <goals>
                  <goal>jxr</goal>
                  <goal>test-jxr</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

