This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 4183d2dc445 IGNITE-28555 Fix javadoc compile on 17jdk (#13036)
4183d2dc445 is described below

commit 4183d2dc445128a9dd24b9b6965ef21208da1234
Author: Aleksandr Nikolaev <[email protected]>
AuthorDate: Thu Apr 16 13:55:57 2026 +0300

    IGNITE-28555 Fix javadoc compile on 17jdk (#13036)
---
 .../tools/ant/beautifier/GridJavadocAntTask.java   | 44 +++++++++++++++-------
 parent/pom.xml                                     |  3 +-
 pom.xml                                            | 18 ---------
 3 files changed, 32 insertions(+), 33 deletions(-)

diff --git 
a/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java
 
b/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java
index dfd5861802b..97350f0250c 100644
--- 
a/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java
+++ 
b/modules/tools/src/main/java/org/apache/ignite/tools/ant/beautifier/GridJavadocAntTask.java
@@ -154,15 +154,22 @@ public class GridJavadocAntTask extends MatchingTask {
                             .configure(cfg -> cfg.setErrorLogEnabled(false))
             ).parse(fileContent);
 
-            if 
(!"11".equals(System.getProperty("java.specification.version"))) {
-                throw new IllegalArgumentException("GridJavadocAntTask isn't 
tested for java versions after 11. " +
-                    "Please check html rendering of documentation package 
groups works correctly and remove this exception then.");
+            String javaVer = System.getProperty("java.specification.version");
+
+            boolean jdk11 = "11".equals(javaVer);
+            boolean jdk17 = "17".equals(javaVer);
+
+            if (!jdk11 && !jdk17) {
+                throw new IllegalArgumentException("GridJavadocAntTask is only 
tested for Java 11 and 17. " +
+                    "Current version: " + javaVer + ". " +
+                    "Please check html rendering of documentation package 
groups works correctly and add support then.");
             }
 
             if ("index.html".equals(file.getName())) {
                 // Try to find Other Packages section.
-                Jerry otherPackages =
-                    doc.find("div.contentContainer table.overviewSummary 
caption span:contains('Other Packages')");
+                Jerry otherPackages = jdk11
+                    ? doc.find("div.contentContainer table.overviewSummary 
caption span:contains('Other Packages')")
+                    : doc.find("button.table-tab:contains('Other Packages')");
 
                 if (otherPackages.size() > 0) {
                     System.err.println("[ERROR]: 'Other Packages' section 
should not be present, but found: " +
@@ -173,7 +180,9 @@ public class GridJavadocAntTask extends MatchingTask {
                         "<configuration> / <groups>");
                 }
 
-                int pkgGrps = doc.find("div.contentContainer 
table.overviewSummary caption span.tableTab").size();
+                int pkgGrps = jdk11
+                    ? doc.find("div.contentContainer table.overviewSummary 
caption span.tableTab").size()
+                    : doc.find("button.table-tab").size();
 
                 if (pkgGrps == 0) {
                     throw new IllegalArgumentException("Documentation package 
groups missed. Please add packages " +
@@ -181,19 +190,24 @@ public class GridJavadocAntTask extends MatchingTask {
                         "<configuration> / <groups>");
                 }
 
-                // This limit is set for JDK11. Each group is represented as a 
tab. Tabs are enumerated with a number 2^N
-                // where N is a sequential number for a tab. For 32 tabs (+ 
the "All Packages" tab) the number is overflowed
-                // and the tabulation becomes broken. See var data in 
"index.html".
-                if (pkgGrps > 30) {
-                    throw new IllegalArgumentException("Too many package 
groups: " + pkgGrps + ". The limit"
-                        + " is 30 due to the javadoc limitations. Please 
reduce groups in parent/pom.xml"
-                        + " inside <plugin>(maven-javadoc-plugin) / 
<configuration> / <groups>");
+                if (jdk11) {
+                    // This limit is set for JDK 11. Each group is represented 
as a tab. Tabs are enumerated with
+                    // a number 2^N where N is a sequential number for a tab. 
For 32 tabs (+ the "All Packages" tab)
+                    // the number is overflowed and the tabulation becomes 
broken. See var data in "index.html".
+                    // JDK 17 uses CSS class-based tab switching, so this 
limit does not apply.
+                    if (pkgGrps > 30) {
+                        throw new IllegalArgumentException("Too many package 
groups: " + pkgGrps + ". The limit"
+                            + " is 30 due to the javadoc limitations. Please 
reduce groups in parent/pom.xml"
+                            + " inside <plugin>(maven-javadoc-plugin) / 
<configuration> / <groups>");
+                    }
                 }
             }
             else if (!isViewHtml(file)) {
                 // TODO: fix the description block location IGNITE-22650
                 // Try to find a class description block.
-                Jerry descBlock = doc.find("div.contentContainer 
.description");
+                Jerry descBlock = jdk11
+                    ? doc.find("div.contentContainer .description")
+                    : doc.find("section.class-description");
 
                 if (descBlock.size() == 0)
                     throw new IllegalArgumentException("Class doesn't have 
description in file: " + file);
@@ -204,6 +218,8 @@ public class GridJavadocAntTask extends MatchingTask {
             "</head>",
             "<link rel='shortcut icon' 
href='https://ignite.apache.org/favicon.ico'/>\n</head>\n");
 
+        s = s.replace("${current.year}", 
String.valueOf(java.time.Year.now().getValue()));
+
         replaceFile(file, s);
     }
 
diff --git a/parent/pom.xml b/parent/pom.xml
index d89af34f5a6..13423a9cde2 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -119,7 +119,7 @@
         <xstream.version>1.4.17</xstream.version>
 
         <!-- Maven plugins versions -->
-        <maven.javadoc.plugin.version>3.2.0</maven.javadoc.plugin.version>
+        <maven.javadoc.plugin.version>3.6.3</maven.javadoc.plugin.version>
         <maven.enforcer.plugin.version>3.6.2</maven.enforcer.plugin.version>
 
         <sonar.organization>apache</sonar.organization>
@@ -702,6 +702,7 @@
                             <name>ignite.buildNumber</name>
                             <!-- See: 
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/SimpleDateFormat.html
 -->
                             <pattern>yywwu</pattern>
+                            <locale>en_US</locale>
                         </configuration>
                     </execution>
                 </executions>
diff --git a/pom.xml b/pom.xml
index b7babc3d803..02103bcccd0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -112,24 +112,6 @@
             <id>javadoc</id>
             <build>
                 <plugins>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>build-helper-maven-plugin</artifactId>
-                        <version>3.0.0</version>
-                        <executions>
-                            <execution>
-                                <id>timestamp-property</id>
-                                <goals>
-                                    <goal>timestamp-property</goal>
-                                </goals>
-                                <phase>validate</phase>
-                                <configuration>
-                                    <name>current.year</name>
-                                    <pattern>yyyy</pattern>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-javadoc-plugin</artifactId>

Reply via email to