From e5733d17b29731299ac9387e70a367802e821cb0 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Wed, 26 Aug 2026 19:30:07 +0000
Subject: [PATCH] Let one package-info stand per package, and aggregate Javadoc before the merge (#899)

---
 /dev/null                                                                              |   28 ----------------------------
 opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/package-info.java |    3 ++-
 opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/package-info.java    |    1 +
 .github/workflows/build.yml                                                            |   16 +++++++++++++++-
 4 files changed, 18 insertions(+), 30 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b96b624..90ecc71 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -96,11 +96,25 @@
       run:   |
         echo "MAVEN_PROFILE_FLAG=-P precommit" >> $GITHUB_OUTPUT
 
+    # The per-module javadoc:jar that runs during verify only ever sees one
+    # module's sources, so it cannot report a package declared by two modules
+    # at once. Only the aggregate on the root reactor can, and it used to run
+    # nowhere but deploy.yml, after the merge and under continue-on-error, so a
+    # broken aggregate blocked nothing and went unnoticed. This is the gate for
+    # it. Appending the goal to the same Maven invocation keeps it in the
+    # reactor that just built; one cell is enough, and this is the platform and
+    # Java version deploy.yml aggregates with.
+    - name: Set Aggregate Javadoc Goal
+      id: javadoc
+      if: runner.os == 'Linux' && matrix.java == '11'
+      run:   |
+        echo "MAVEN_JAVADOC_GOAL=javadoc:aggregate" >> $GITHUB_OUTPUT
+
     - name: Build with Maven
       timeout-minutes: 180
       env:
         MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.retryHandler.count=10
-      run: mvn --batch-mode --errors --update-snapshots verify --file pom.xml ${{ steps.failsafe.outputs.MAVEN_PROFILE_FLAG }}
+      run: mvn --batch-mode --errors --update-snapshots verify ${{ steps.javadoc.outputs.MAVEN_JAVADOC_GOAL }} --file pom.xml ${{ steps.failsafe.outputs.MAVEN_PROFILE_FLAG }}
     - name: Test on Unix
       if: runner.os == 'Linux'
       run:   |
diff --git a/opendj-embedded-server-examples/src/main/java/org/forgerock/opendj/examples/package-info.java b/opendj-embedded-server-examples/src/main/java/org/forgerock/opendj/examples/package-info.java
deleted file mode 100644
index b28a9a7..0000000
--- a/opendj-embedded-server-examples/src/main/java/org/forgerock/opendj/examples/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * The contents of this file are subject to the terms of the Common Development and
- * Distribution License (the License). You may not use this file except in compliance with the
- * License.
- *
- * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
- * specific language governing permission and limitations under the License.
- *
- * When distributing Covered Software, include this CDDL Header Notice in each file and include
- * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
- * Header, with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyright [year] [name of copyright owner]".
- *
- * Copyright 2016 ForgeRock AS.
- */
-
-/**
- * Classes providing examples of usage of Embedded Server API.
- */
-package org.forgerock.opendj.examples;
-
diff --git a/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/package-info.java b/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/package-info.java
index d0ae1e1..03ef372 100644
--- a/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/package-info.java
+++ b/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/package-info.java
@@ -12,11 +12,12 @@
  * information: "Portions Copyright [year] [name of copyright owner]".
  *
  * Copyright 2012 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
  */
 
 /**
  * This package includes examples illustrating various use cases of the
- * OpenDJ LDAP SDK.
+ * OpenDJ LDAP SDK, and of the Embedded Server API.
  */
 package org.forgerock.opendj.examples;
 
diff --git a/opendj-legacy/src/main/java/org/opends/server/api/package-info.java b/opendj-legacy/src/main/java/org/opends/server/api/package-info.java
deleted file mode 100644
index 5e21155..0000000
--- a/opendj-legacy/src/main/java/org/opends/server/api/package-info.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * The contents of this file are subject to the terms of the Common Development and
- * Distribution License (the License). You may not use this file except in compliance with the
- * License.
- *
- * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
- * specific language governing permission and limitations under the License.
- *
- * When distributing Covered Software, include this CDDL Header Notice in each file and include
- * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
- * Header, with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyright [year] [name of copyright owner]".
- *
- * Copyright 2015 ForgeRock AS.
- */
-
-/**
- * Contains a number of API declarations for use throughout the
- * Directory Server.  Whenever possible, these APIs should be declared
- * using abstract classes rather than interfaces so that they can be
- * altered in future versions without impacting backward
- * compatibility.
- * <BR><BR>
- * Note that the mere existence of a class or interface in this
- * package does not in itself imply that it is intended for use by
- * third party code.  Please refer to the official product
- * documentation to indicate which APIs may be safely used by anyone
- * other than the core Directory Server developers.  Failure to heed
- * this warning may result in code that could have unintended side
- * effects or that does not work properly across different Directory
- * Server versions.
- */
-package org.opends.server.api;
-
diff --git a/opendj-legacy/src/main/java/org/opends/server/backends/jeb/package-info.java b/opendj-legacy/src/main/java/org/opends/server/backends/jeb/package-info.java
deleted file mode 100644
index 623bbe6..0000000
--- a/opendj-legacy/src/main/java/org/opends/server/backends/jeb/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * The contents of this file are subject to the terms of the Common Development and
- * Distribution License (the License). You may not use this file except in compliance with the
- * License.
- *
- * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
- * specific language governing permission and limitations under the License.
- *
- * When distributing Covered Software, include this CDDL Header Notice in each file and include
- * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
- * Header, with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyright [year] [name of copyright owner]".
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- * Portions Copyright 2015 ForgeRock AS.
- */
-
-/**
- * Contains the code for the Directory Server backend that uses the Berkeley DB
- * Java Edition as the repository for storing entry and index information.
- * These classes are here just to support upgrade and are deprecated.
- */
-package org.opends.server.backends.jeb;
-
diff --git a/opendj-legacy/src/main/java/org/opends/server/replication/plugin/package-info.java b/opendj-legacy/src/main/java/org/opends/server/replication/plugin/package-info.java
deleted file mode 100644
index 6a1f691..0000000
--- a/opendj-legacy/src/main/java/org/opends/server/replication/plugin/package-info.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * The contents of this file are subject to the terms of the Common Development and
- * Distribution License (the License). You may not use this file except in compliance with the
- * License.
- *
- * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
- * specific language governing permission and limitations under the License.
- *
- * When distributing Covered Software, include this CDDL Header Notice in each file and include
- * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
- * Header, with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyright [year] [name of copyright owner]".
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- */
-
-/**
- * This package contains the part of the Multi-master
- * replication code that works on the Directory Server side.
- * <br>
- * The main classes of this core are :
- * <ul>
- * <li>
- * <A HREF="MultimasterReplication.html"><B>MultimasterReplication
- * </B></A>contains the synchronization provider
- * code and more generally all the code that makes the glue between the core
- * server and the replication code.
- * </li>
- * <li>
- * <A HREF="ReplicationDomain.html"><B>ReplicationDomain</B></A>
- * contains the bulk of the Directory Server side of the
- * replication code. Most notably it contains the root method for
- * publishing a change, processing a change received from the replicationServer
- * service, handle conflict resolution, handle protocol messages from the
- * replicationServer.
- * </li>
- * </ul>
- */
-package org.opends.server.replication.plugin;
-
diff --git a/opendj-legacy/src/main/java/org/opends/server/schema/package-info.java b/opendj-legacy/src/main/java/org/opends/server/schema/package-info.java
deleted file mode 100644
index 9dd7ff9..0000000
--- a/opendj-legacy/src/main/java/org/opends/server/schema/package-info.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * The contents of this file are subject to the terms of the Common Development and
- * Distribution License (the License). You may not use this file except in compliance with the
- * License.
- *
- * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
- * specific language governing permission and limitations under the License.
- *
- * When distributing Covered Software, include this CDDL Header Notice in each file and include
- * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
- * Header, with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyright [year] [name of copyright owner]".
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- */
-
-/**
- * Contains implementations of various Directory Server schema elements.  In
- * particular, this holds the implementations of all the attribute syntaxes and
- * equality/substring/ordering/approximate matching rules that have been defined
- * in the server.  Other schema elements (e.g., attribute types, objectclasses,
- * name forms, matching rule uses, DIT content rules, and DIT structure rules)
- * do not require any specialized processing and therefore implementations of
- * those more generic objects are defined elsewhere in the Directory Server
- * codebase.
- */
-package org.opends.server.schema;
-
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/package-info.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/package-info.java
index 438d0ee..2b49685 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/package-info.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/package-info.java
@@ -20,6 +20,7 @@
 /**
  * Contains the code for the Directory Server backend that uses the Berkeley DB
  * Java Edition as the repository for storing entry and index information.
+ * These classes are here just to support upgrade and are deprecated.
  * <BR><BR>
  *
  * <H2>On-disk Representation</H2>

--
Gitblit v1.10.0