Copilot commented on code in PR #9704:
URL: https://github.com/apache/ozone/pull/9704#discussion_r2908438811


##########
pom.xml:
##########
@@ -2371,6 +2371,54 @@
     </extensions>
   </build>
 
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>${maven-javadoc-plugin.version}</version>
+        <inherited>false</inherited>
+        <reportSets>
+          <reportSet>
+            <id>aggregate</id>
+            <reports>
+              <report>aggregate</report>
+            </reports>
+            <configuration>
+              <!-- Increase memory available to the javadoc JVM -->
+              <maxmemory>1024m</maxmemory>
+
+              <!-- Titles shown in the generated Javadoc -->
+              <doctitle>Apache Ozone API - ${project.version}</doctitle>
+              <windowtitle>Apache Ozone ${project.version} API</windowtitle>
+
+              <!-- Logical grouping and custom titles for packages -->
+              <groups>
+                <group>
+                  <title>Core</title>
+                  <packages>org.apache.ozone*</packages>
+                </group>
+                <group>
+                  <title>Hadoop Ozone Integration</title>
+                  <packages>org.apache.hadoop.ozone*</packages>
+                </group>
+              </groups>
+
+              <!-- Output settings and encoding -->
+              
<reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
+              <destDir>ozone-main/api</destDir>
+              <source>${maven.compiler.release}</source>
+              <charset>${project.reporting.outputEncoding}</charset>
+
+              <useStandardDocletOptions>true</useStandardDocletOptions>
+              <includeDependencySources>false</includeDependencySources>

Review Comment:
   The root POM already configures maven-javadoc-plugin in 
<build><pluginManagement> with important settings (eg excludePackageNames, 
sourceFileExcludes, doclint=none, notimestamp). This new <reporting> 
configuration is separate and does not inherit those settings, so the aggregate 
Javadoc report may re-enable doclint and include generated/proto packages that 
were explicitly excluded elsewhere, potentially causing Javadoc generation 
failures or inconsistent output. Consider duplicating/reusing the existing 
javadoc plugin configuration here (or extracting shared values into properties) 
so the aggregate report uses the same exclusions/doclint behavior as the rest 
of the build.
   ```suggestion
                 <includeDependencySources>false</includeDependencySources>
   
                 <!-- Match main Javadoc plugin behavior: disable doclint and 
timestamps,
                      and exclude generated/proto sources and packages -->
                 <doclint>none</doclint>
                 <notimestamp>true</notimestamp>
                 
<excludePackageNames>*.generated.*:*.proto.*</excludePackageNames>
                 
<sourceFileExcludes>**/generated/**,**/proto/**</sourceFileExcludes>
   ```



##########
pom.xml:
##########
@@ -2371,6 +2371,54 @@
     </extensions>
   </build>
 
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>${maven-javadoc-plugin.version}</version>
+        <inherited>false</inherited>
+        <reportSets>
+          <reportSet>
+            <id>aggregate</id>
+            <reports>
+              <report>aggregate</report>
+            </reports>

Review Comment:
   PR description mentions adding default parameters for the 
`javadoc:aggregate` goal, but this change configures the aggregate *report* 
under <reporting>. Maven does not apply <reporting> configuration when invoking 
the plugin goal directly (eg `mvn javadoc:aggregate`); it is only used by `mvn 
site`/site generation. If the intent is to affect direct `javadoc:aggregate` 
runs too, add an equivalent configuration under <build><plugins> (or ensure a 
plugin entry exists there that can pick up shared config), or clarify/update 
the description if the change is meant to be site-report-only.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to